Configure new SSH authorization key for Linux on Azure
If you would like to use SSH with Linux virtual machines on Azure, there is a great documentation here. One question I have seen in the forum, which is not clearly explained in the documentation is, how do we add a new SSH authorization key, if we missed adding the SSH file, during the creation of virtual machine.
Giving the steps I have followed to setup a new SSH authorization key below:
Step 1: I created a Linux VM (Ubuntu 14) on Azure using quick create VM (linuxvmforssh.cloudapp.net).
Step 2: Executed following commands from Git shell on my Windows 8.1 laptop
GIT> ssh-keygen -t rsa -b 2048 -v -f azurecert.key GIT> scp azurecert.key.pub azureuser@linuxvmforssh.cloudapp.net:/home/azureuser GIT> ssh azureuser@linuxvmforssh.cloudapp.net azureuser@linuxvmforssh:~$ cat azurecert.key.pub >> .ssh/authorized_keys azureuser@linuxvmforssh:~$ sudo service ssh restart azureuser@linuxvmforssh:~$ exit GIT> ssh -i azurecert.key azureuser@linuxvmforssh.cloudapp.net
Hope this helps you to setup new SSH authorized keys for your Linux virtual machines.
Posted on 2015/02/24, in Microsoft Azure and tagged IaaS, Linux, Microsoft Azure, SSH, Ubuntu. Bookmark the permalink. Leave a comment.
Leave a comment
Comments 0