
RSA2/DSA key access from PuTTY to a *NIX OpenSSH server
May 1, 2009If you want to access to your *NIX server using PuTTY in Windows, you just should follow the next steps to create a secure access using RSA/DSA public key infrastructure.
1) The first thing is configuring our openSSH server in the “/etc/ssh/sshd_config” file and modifying some configuration fields
- Protocol 2
- RSAAuthentication yes
- PubkeyAuthentication yes
- AuthorizedKeysFile %h/.ssh/authorized_keys
Reload the ssh daemon. /etc/init.d/ssh reload
2) Get the PuTTY Key Generator (Just typing it in google) and generate a RSA2/DSA public and private keys. Save them in a folder, and copy the text with Ctrl+C or in a file. This is your public key in openSSH format (The format which uses the ssh daemon)

It would be a good idea protect our private key with a passphrase, at least, if we’ll use the remote access in a public place like an office. Maybe you must try PuTTY PageAgent to manage your keys, but this is another bussiness
3) Paste the text in your server in you “$home/.ssh/authorized_keys” of the user that you want to authenticate with RSA/DSA. (I suppose that “public_key” file contains the text generated by PuTTY)
- cat public_key >>$home/.ssh/authorized_keys
4) Now, just open PuTTY and load your private key

5) Just login in the server as usual, and you should be logged in without typing your password. You must be type the keyphrase if you had set it in the 2nd step.
Regards, and be careful with your private key file