'Azure VM creation using ssh public key source=use existing public key
I created a VM using "use existing public key". When I try logging into Linux Server using SSH, I'm getting error as "Permission denied (publickey)". In case if I select "use existing key stored in Azure", it is working as expected.
Can you please suggest why I'm getting this error.
Regards, Santosh
Solution 1:[1]
You can not use the public key created in Azure as Use Existing Public Key. Public Key Created in Azure in only for User existing key stored in Azure.
For using the Use Existing Public Key You need to create a Public Key in your local machine or you can create using azureCLI as well.
The following command creates an SSH key pair using RSA encryption and a bit length of 4096:
ssh-keygen -m PEM -t rsa -b 4096
Using the above command you will have two key one is private(id_rsa) and another is public(id_rsa.pub).Use the Public One you can get the key at this location cd /home/rahul/.ssh/
Refere this Microsoft Document.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | RahulKumarShaw-MT |

