Using putty and ssh keys in Windows
Since it’s not the first time I have to explain how this is done, I decided to put it in the form of How-To in pictures
Download the putty archive from here putty.zip
1. 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 on it. We save the private key as mykey.ppk and the public one as id_rsa.pub 2. Next, we 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 myserver The server's host key is not cached in the registry. You have no guarantee that the server is the computer you
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 connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
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.pub
local: id_rsa.pub => remote: /tmp/id_rsa.pub
psftp>
3. The key has been copied, now you need to add it to /root/.ssh/authorized_keys.
To do this, log in again with the password, via 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 starting, he sits in the tray to add a key, right-click on “Add Key”. Enter the passphrase: Now log in to putty:
Almost everything, in order to eliminate encoding problems, with a crooked display of mc in putti, we fix the locale in the settings:
Download the putty archive from here putty.zip
1. 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 on it. We save the private key as mykey.ppk and the public one as id_rsa.pub 2. Next, we 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 myserver The server's host key is not cached in the registry. You have no guarantee that the server is the computer you
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 connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
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.pub
local: id_rsa.pub => remote: /tmp/id_rsa.pub
psftp>
3. The key has been copied, now you need to add it to /root/.ssh/authorized_keys.
To do this, log in again with the password, via 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 starting, he sits in the tray to add a key, right-click on “Add Key”. Enter the passphrase: Now log in to putty:
login as: root Authenticating with public key "rsa-key-20080908" from agent
Almost everything, in order to eliminate encoding problems, with a crooked display of mc in putti, we fix the locale in the settings: