Jun 9 2009

Fabien Potencier wrote a nice article that I’m going to try out – usernameless and passwordless logon with SSH on Linux systems. This tutorial is especially useful for those with 1and1.co.uk hosting where the username is something like u12345678, which I never bother remembering…

First create the logon key. SSH to the server you wish to set up the connection to using your normal username and password.

chmod 700 ~/.ssh
cd ~/.ssh
chmod 600 authorized_keys
ssh-keygen -t dsa
cat id_dsa.pub >> ~/.ssh/authorized_keys

Then download the id_dsa file to your laptop, using SFTP or similar, move it to something like ~/.ssh/keys/myserver.key and chmod 600 myserver.key. On your laptop, edit ~/.ssh/config and add something like this:

Host myserver
    HostName 1.2.3.4
    User u12345678
    IdentityFile /home/user/.ssh/keys/myserver.key

That should be all there is to it!

Leave a Reply