Creating RSA Keys for PuTTY Key Based Authentication PuTTY Sessions

3 Aug

It’s a good security practice to utilize keys for openSSH (ssh) authentication. From a Windows Client this is most commonly done with PuTTY.

This guide will show show you how to create your RSA keys for your PuTTY instances.

Generate SSH RSA Public and Private Keys
Download the latest PuTTY Installer for Windows from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html. Alternatively you can download puttygen.exe if you’re already using the putty.exe binary.

  • Launch puttygen.exe

    The PuTTY Key Generator application will launch
    putty_keygen_001

    Keep the default SSH-2 (RSA) and 2048 (or greater) encryption strength.

  • Click “Generate”

    You’ll be presented with your generated key which is to be inserted into the authorized_keys files on the target Linux system(s).
    putty_keygen_002

  • Add a comment and a password. Though it’s possible to use keys without a password it’s not recommended as it’ll greatly reduce the security.
  • Save your private and public keys.

Setup SSH Keys within PuTTY Sessions

  • Open putty.exe and add the Public Key to Connections –> SSH –> Auth
    putty_keygen_003
  • When presented with the following message, click “Yes”
    putty_keygen_004
  • If done right you’ll be be requested to put in the user you’re logging in as with the key, once entered it’ll confirm the key and request the password for the key, once done you’ll be authenticated to the system.
    putty_keygen_005

ben.kevan

I am ben kevan.. Well yeah. .that's about it.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.