When you cre­ate a SSH key­pair you can con­nect to your SSH server with­out enter­ing a password.

Win­dows:
Gen­er­ate key with put­ty­gen, I use ssh2-rsa/1024 as para­me­ters.
Now copy the pub­lic key from the “Pub­lic key for past­ing…” textfield into the clip­board. Fire up putty and con­nect to your SSH server.

Linux:
I use the root user for this exam­ple:
cre­ate a file /root/.ssh/authorized_keys2 and paste the pub­lic key into this file. Change per­mis­sion for this file “chmod –R og= /root/.ssh”.

You can restrict the poten­tials for this user by enter­ing options in front of the pasted pub­lic key:
no-port-forwarding ssh-dss KEYKEYKEY… dsa-key-20070211
I set the option no-port-forwarding (which should speak for itself what this option is for). A “man sshd” should give you all the options you can spec­ify in this file.

Win­dows:
Now add a “key passphrase” to your pri­vate key and save the pri­vate key, for exam­ple as c:meepprivate-key.ppk. Start putty, load your ses­sion and add the pri­vate key to Con­nec­tion / SSH / Auth / Authen­ti­ca­tion para­me­ters. Save the ses­sion and con­nect. If you spec­i­fied a key passphrase you need to enter the pass­word (of the key passphrase).

Another nice tool is pageant.exe, with this tool you can add your pri­vate key and you only need to enter the pass­word for your pri­vate key ONCE, it doesn’t mat­ter how many times you con­nect to the server.