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

Edited by Cave Man, Anonymous

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.

Ad

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
    Advertisement
    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
    Advertisement
    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

    Advertisement

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 these steps, ask a question for more help, or post in the comments section below.

Comments

VisiHow welcomes all comments. If you do not want to be anonymous, register or log in. It is free.




Caveman
Premier Author
2 Articles Started
210 Article Edits
5,325 Points
Caveman is a premier author with VisiHow. Caveman has achieved the level of "Sergeant" with 5,325 points. Caveman has started 2 articles (including this one) and has also made 210 article edits. 5,900 people have read Caveman's article contributions.
Caveman's Message Board
Caveman: Hi, my name is Caveman.
Caveman: Can I help you with your problem about "Create a public key using putty so you can login via ssh key pair"?
 

Article Info

Categories : Websites

Recent edits by: Cave Man

Share this Article:

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

Do you have a question not answered in this article?
Click here to ask one of the writers of this article
x

Thank Our Volunteer Authors.

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