I created my first Linux Azure VM this weekend. I chose the option to secure it with an SSH Public Key instead of a password. Creating a password would have been easier. SSH public key will be much more secure. It took some learning to get it right.
First Step – PuttyGen for creating the key
After choosing the ssh key option, the Azure portal required entering a public key. On Windows, PuttyGen was the tool suggested to create the key, so I downloaded it and tried it out.
After creating an RSA 2048 key, I saved the private key, which required a key passphrase. Saving the key and noting the passphrase was important for the step 2.
Step 2 – Login with Putty
After the VM was created, I logged in to my Azure Linux VM with Putty. Putty and PuttyGen were part of the same download and install.
Putty stores settings in what it calls sessions. You can save the IP address and port in the session. You can also save the authentication options. In this case, the private key is useful to store in a session.
I selected the private key file which I saved from PuttyGen on the auth screen. This is where I needed the passphrase I noted when saving the key file in step 1. I also needed it later when I loaded the session with this key file.
I was happy to find that when I opened a session with the private key loaded I was able to reach my Ubuntu server on Azure.
Next step, load the robot operation system! 🙂
Leave a Reply