SSH - Gary-Moore/developmentwiki GitHub Wiki

Generate SSH Key Pair

To generate a new SSH key, the following can be run from a bash window:

ssh-keygen -t rsa -b 2048
  • Enter a suitable filename and location
  • Specify a passphrase

Add SSH Key to Azure VM

After generating the SSH key pair, you need to add the public key to your Azure VM. You can do this through the Azure Portal.

  1. Go to your VM's page.
  2. Click on "Reset Password" section in the left hand panel.
  3. Choose the "Add SSH public key" option under "mode".
  4. Set the user name.
  5. Choose the "Use existing public key" option for "SSH Public Key source".
  6. Copy and paste the public key text into the "SSH public key" section.