Pages

Friday, August 9, 2013

Puttygen's Public Key Problem with Linux Server

A need comes up to set up password authentication between my notebook and Linux server. I have to use puttygen to generate public/private key on my notebook because it is running Windows 7. Then I uploaded public key(example.pub) to Linux server and run the the following command to add it into ssh's authorized_keys file.
#cat example.pub >> ~/.ssh/authorized_keys
But passwordless authentication with putty failed with message saying "Server Refused Our Key". Then I googled the error and found below link.
http://www.walkernews.net/2009/03/22/how-to-fix-server-refused-our-key-error-that-caused-by-putty-generated-rsa-public-key/

To make long story short, you have to modify the public key so that it will work on Linux server. Below are the steps extracted from above link. Pardon me for being lazy..
Hope it useful for somebody.