Question: How do you login Azure Virtual Machine with SSH Key I have been getting this error: "SSH: Permission denied (publickey)" and in some cases "Invalid Format" of SSH Private Key.
Login to See the Rest of the Answer
Answer: If you have existing Public Keys in the Azure Virtual Machine, you can reset the Keys by going to
1. Navigate to the Azure Virtual Machine Instance/Page in Azure Portal
2. Scroll all the way down until you see (in the Troubleshooting Section) a link for
reseting the Password.
3. Paste your newly generated Public Key. You can generate a Public Key using PuttyGen
1. Make sure you convert PrivateKey.ppk to PrivateKey.pem by going to "Conversions" in
PuttyGen, loading the PrivateKey.ppk and selecting
"Exporting SSH (Force New File Format) for you to use the PrivateKey to login to Azure.
Azure does not accept .ppk because .ppk is a PuttyGen File Format.
Here is the image on How to Reset Azure Password and update the SSH Keys