0

How to add private key in secret of azure key vault to ssh in azure virtual machine using azure bastion?
I am trying to login a linux virtual machine using bastion and i want to put my .pem file in secret, but i am not able to it right.

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
  • [Under what circumstances may I add "urgent" or other similar phrases to my question, in order to obtain faster answers?](//meta.stackoverflow.com/q/326569) – Filburt Jun 19 '23 at 13:28
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jun 20 '23 at 01:15

1 Answers1

0

You can use this answer to add a private key to an Azure Key Vault. How to store a private key in Azure Keyvault?

To summarize, run the following from powershell:

az login
az account set --subscription <subscriptionName>
az keyvault secret set --name <keyName> --vault-name <vaultName> --file <\path\to\key.pem>