Generate ssh keys on windows 8

SSH

If you are using an ssh client on windows to control a remote webserver and want to setup passwordless logins then you need to create ssh keys. The puttygen command from the putty suite can be used to generate keys in both putty and openssh formats.

Download the puttygen program from the following url
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Generate keys

Now use the puttygen command to generate keys. Lets create an rsa key for example. Launch the puttygen.exe program. It will start a gui.

Click on the "Generate" button. Then it will ask to move the mouse over the window. Keep on moving the mouse randomly till the key generation is complete.

puttygen_win8

The text box will now contain the public key in openssh format that can be put into the "authorized_keys" file of openssh server. To get the private key click the menu Conversions > Export OpenSSH key.

Save the key by clicking File > Save private key.







Last Updated On : 30th June 2013

Subscribe to get updates delivered to your inbox

1 Comment + Add Comment

  • You have chosen some great topics to overview. I would just add one more paragraph and picture that adds a passphrase to the key we just generated. But for those days when you don’t want to deal with passphrases, we can just use Pageant to type the passphrase once and then remember for the remainder of the session.

    I find this particularly common in my git-hub/bitbucket repos that I am syncing over SSH.

    Its just one more simple step that reminds us to get the most out of our keys without being a constant pain.

Leave a comment