How to Generate and Use SSH Keys with PuTTY

Watch the video tutorial here!

1. Launch PuTTYgen. If needed download from here: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

Image

2. Under 'Actions' click Generate.

Image

Move the mouse around to generate the key.

Image

3. Create a passphrase.

Image

4. Under 'Actions' select Save private key.

Image

Save the file as 'id_rsa.ppk'.

5. Highlight and copy the public key.

Image

6. Launch PuTTY and logon to the Grid.

7. Create and/or open the authorized_keys file: vi ~/.ssh/authorized_keys

Image

8. Press 'i' to insert and right click your mouse to paste the public key into the authorized_keys file.

Image

Type ':wq' to save and quit.

Image

9. Logout of the Grid.

10. Launch PuTTY. Under 'Connection' click on 'SSH' and then 'Auth'. Under 'Private key file for authentication:' click 'Browse' and select the private key file.

Image

11. Select Session and Save your session to save the changes.

Image

11. Click Open and you can now login using your key pair authentication. Enter your passphrase when prompted.

Image

You should now be successfully logged onto the Grid.