Create a public key using putty so you can login via ssh key pair

Edited by Cave Man

To create an ssh key using putty you need to download the full putty suite. This procedure was not intuitive to me so I am writing out the exact steps for anyone to follow.

Instructions

  1. 1
    Download and install the putty suite using the new Windows installer
    .
    Don't be thrown off by the fact that it has not achieved version 1.0 yet. It works fine.
    Img-2013-apr-24-048.jpg
    Was this step helpful? Yes | No| I need help
  2. 2
    Run Puttygen from the start menu, browsing under the newly installed putty folder as seen below
    .
    Img-2013-apr-24-016.jpg
    Was this step helpful? Yes | No| I need help
  3. 3
    Click on "Generate public/private key pair"
    .
    Img-2013-apr-24-017.jpg
    Was this step helpful? Yes | No| I need help
  4. 4
    Move your mouse around like mad to create real world random data so putty can generate a ssh key pair for you
    .
    Img-2013-apr-24-018.jpg
    Was this step helpful? Yes | No| I need help
  5. 5
    A public key will be generated as seen below
    .
    Img-2013-apr-24-019.jpg
    Was this step helpful? Yes | No| I need help
  6. 6
    Copy and paste it into notepad and hit save
    .
    You will need this later.
    Img-2013-apr-24-021.jpg
    Was this step helpful? Yes | No| I need help
  7. 7
    Click on Save private key button and save out a ppk file with a name you will remember like puttyprivatekey.ppk
    .
    Important: If you don't want to have to enter a password every time you connect to your server do not enter a password in this screen. You will get a warning but ignore it.
    Img-2013-apr-24-051.jpg
    Img-2013-apr-24-049.jpg
    Was this step helpful? Yes | No| I need help
  8. 8
    Configure putty to use this new key for the "connection" you wish
    .
    Launch Putty.exe and "load" the profile you want to add the ssh key pair to. THIS IS IMPORTANT. YOU MUST LOAD THE PROFILE FIRST OR THE NEXT STEP DOESN'T WORK. Now choose Connection > SSH > Auth in the left pane of the window. Now click the browse button and select your puttyprivatekey.ppk file.
    Img-2013-apr-24-035.jpg
    Was this step helpful? Yes | No| I need help
  9. 9
    Now save this key to your connection profile
    .
    Now here is where I got stuck. The only button I could see after that was the open button. You do not click this button. Instead go back to your connection under the session screen by clicking on Category > Session in the left pane. It will already be loaded from the previous step. (If you didn't load it, it's too late.. go back a step) Now click on "Save".
    Was this step helpful? Yes | No| I need help
  10. 10
    Next load your public key onto your server
    .
    Often your ISP will have a screen in their admin panel to do this.
    Img-2013-apr-24-032.jpg
    Was this step helpful? Yes | No| I need help
  11. 11
    Now connect through your newly ssh key pair
    .
    You must enter the user ID you wish to connect using.
    Img-2013-apr-24-044.jpg
    Was this step helpful? Yes | No| I need help
  12. 12
    If you added a password while creating your ssh key pair you must enter it now.
    Was this step helpful? Yes | No| I need help

Tips Tricks & Warnings

  • Creating a ssh key pair without a password is both convenient but dangerous. Be sure to keep your private key very safe if you choose not to use a password!
  • You can also configure putty to auto login as a particular user for complete login automation under the category "Connection > Data" in the left pane.

If you have problems with any of the steps in this article, please ask a question for more help, or post in the comments section below.

Comments

Article Info

Categories : Websites

Share this Article:

Thanks to all authors for creating a page that has been read 1,214 times.

x

Thank Our Volunteer Authors.

Would you like to give back to the community by fixing a spelling mistake? Yes | No