15. Using PuTTY with SSH2 Keys to Access (Open)SSH Servers
1. Generate a new key pair using the PuTTYgen program on your PC:
. Select SSH2 DSA, 1024 bits in the key and click on Generate
. Follow the instructions to wiggle your mouse and wait .
. Make sure that you type a Key passphrase into the box and the same
pass phrase into the Confirm passphrase box.
. Save the generated key by clicking on Save private key choosing the
name of the computer, eg. bohrg, which you will wish to access
using this key. A file eg. bohrg.ppk will be saved to your default
directory.
2. Whilst still using PuTTYgen:
. Copy the public key text (printed in the large box) into a file for
the remote server (the computer which you will want to access).
The file containing your keys on the remote server will need to be
called .ssh/authorized_keys2 (or .ssh/authorized_keys on older
computers like psiphi).
. This is most easily accomplished by using copy (CTRL-c) and then
paste into a file on your PC. Very important note: each public
key must be on one single continuous line: The line will start
with ssh-dss, then a space, then a long text string ending with
== dsa-key-.... with no intervening new-line characters.
. You must then have this file transferred onto the server if you are
unable to ftp or sftp it there yourself, and the contents of the
current authorized_keys file, if there is one, must be merged with
it. This final step is analogous to transferring a key file
(.ssh/id_dsa.pub) which was generated using ssh-keygen on unix or
cygwin (see http://mctalby.mc.man.ac.uk/~mc/_ssh/ssh.2.html).
3. To log into the remote server using PuTTY and keys:
. Select the SHH Category and select Preferred SSH protocol
version 2 only
. Select the SSH-Auth category and click on Browse and select your
private key file eg. bohrg.ppk.
. Return to Session category and use PuTTY as normal, entering the
hostname of the server and finally clicking on Open.
. An alternative to specifying the private key file using the SSH-
Auth-Browse method above is to double click on the bohrg.ppk
file icon, enter the passphrase and let PuTTY use the Pageant
program to deal with your keys automatically in the background .
About this document:
Produced from the SGML: /home/mc/public_html/_ssh/_reml_grp/ssh.reml
On: 4/4/2006 at 17:51:25
Options: reml2 -i noindex -l long -o html -p multiple