How to create Azure Virtual Machine and perform login using SSH

From PUBLIC-WIKI
Revision as of 16:12, 26 March 2018 by Eyales (talk | contribs) (Created page with "== Generating SSH keys (from Windows machine) == * Download puttygen.exe from: : http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html * Run the puttygen.exe * Clic...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Generating SSH keys (from Windows machine)

  • Download puttygen.exe from:
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
  • Run the puttygen.exe
  • Click Generate and follow the on-screen instructions to generate a new key.
Note: Make sure you create keys with at least 2048 bits
  • Click Save private key to write your private key to a file with a .ppk extension.
  • Click Save public key to write your public key to a file for later use.

Generating SSH keys (from Linux machine)

  • Login to the Linux machine console
  • Run the following command to generate the SSH key pair:
ssh-keygen -t rsa -f ~/.ssh/[KEY_FILENAME]
Note: Replace KEY_FILENAME with the actual private key file name
  • Change the permissions of the SSH private key using the command below:
chmod 400 ~/.ssh/[KEY_FILENAME]
Note: Replace KEY_FILENAME with the actual private key file name