//Cloud notes from my desk -Maheshk

"Fortunate are those who take the first steps.” ― Paulo Coelho

[Linux] How to login Azure Linux VM’s using SSH key pair

This post is for Linux newbies trying to figure out SSH way login to Azure Linux VM. I am following the steps explained here. Had seen many times our windows users struggle to get this right at first shot. Hope the below screenshots are clear to follow and achieve easy logon. Ps note, there are many ways to get this done but I felt this as the quick way to get it right without jumping between tools/sites.

Step 1: I am using WSL but you can try Git Bash or bitvise or Putty or Tux vm or any other SSH client of your choice.


Pls note down the Key passphrase safely. This is required when we SSH to Linux VM from $ terminal.

Step 2: You would see the public and private keys generated at the path ~/.ssh. Cat out the id_rsa.pub file to grab the public key which is required when creating Azure Linux VM.


Step 3: Paste the above Public key at the time of VM creation in portal or CLI


Step 4: Once the VM is created, copy the SSH command to logon


Step 5: Go back to the your favorite SSH client and run the above copied command. Pls note, it will prompt for the passphrase which you have to enter now. On success, you would see your remote machine terminal.


Let me know if you see this helps you in some way.

Happy learning !

2018-01-30 Posted by | Azure, Linux, Open Source | | 2 Comments


%d bloggers like this: