As I started my tutorial on adding fonts to PuTTY on the N95, I very quickly decided that having to enter a user name and password every time I logged in was taking too long. So I generated an RSA key pair with a blank pass phrase just to save time. Don’t worry, of course I deleted the key pair as soon as I was finished. The last thing I need is to lose my phone and have some stranger logging into my server!
Note: this procedure is not specific to just the N95, nor is it only specific to Linux. I use Linux in my examples because I’m not a Windows user. The procedure described below on how to generate RSA keys can be adapted to puttygen.exe on Windows.
[user@radon ~]$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa):
Created directory ‘/home/user/.ssh’.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/user/.ssh/id_rsa.
Your public key has been saved in /home/user/.ssh/id_rsa.pub.
The key fingerprint is:
79:8a:08:bd:fb:da:71:59:f4:28:e6:c3:01:12:5a:69 user@radon.example.com
[user@radon ~]$ cd .ssh/
[user@radon .ssh]$ ls
id_rsa id_rsa.pub known_hosts
[user@radon .ssh]$ cat id_rsa.pub > authorized_keys
[user@radon .ssh]$ chmod 644 authorized_keys
The chmod command above is very important. Your authorized_keys file must only be writable by you. If is is group writable sshd will refuse to use it.
[user@radon .ssh]$ puttygen id_rsa -o id_rsa.ppk