Since it is not the first time that I have to explain how this is done, I decided to make it in the form of a How-To in pictures
Download the putty archive from here
putty.zip1. Unpack and run ssh-keygen

Select the ssh-rsa key and the length of 2048 bits. Click "Generate".

The key is ready, fill in the passphrase and comment to it. Save the private key as
mykey.ppk and public as
id_rsa.pub2. Next, you need to copy our public key to the server. To do this, run psftp.
psftp: no hostname specified; use "open host.name" to connect
psftp>
open myserverThe server's host key is not cached in the registry. You
have no guarantee that you are the computer
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 2048 xx: xx: xx: xx: xx: xx: xx: xx: xx: xx: xx: xx: xx: xx: xx: xx
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on
adding the key to the cache, enter "n".
If you’re not
connection.
Store key in cache? (y / n) y
login as: root
root @ myserver's password:
Remote working directory is / root
psftp>
put id_rsa.pub /tmp/id_rsa.publocal: id_rsa.pub => remote: /tmp/id_rsa.pub
psftp>
3. The key is copied, now you need to add it to /root/.ssh/authorized_keys
To do this, log in again with a password, putty and execute
ssh-keygen -i -f /tmp/id_rsa.pub >> /root/.ssh/authorized_keys')
Now it remains to add our key to ssh-agent'a. After launching it sits in the tray, to add a key, right click on the “Add Key”

Enter the passphrase:

Now log in to putty:
login as: root
Authenticating with public key "rsa-key-20080908" from agent
Practically everything, in order to eliminate problems with encodings, with a curved mc display in the path, we fix the locale in the settings:
