Martin Paul Eve bio photo

Martin Paul Eve

Professor of Literature, Technology and Publishing at Birkbeck, University of London

Email Books Twitter Google+ Github Stackoverflow MLA CORE Institutional Repo ORCID ID   ORCID iD

Email Updates

It can be very handy to be able to login to an SSH shell without supplying a password. Here's how.

Firstly, on your client machine, generate a keypair. If you are using Windows you can do this using PuTTYgen. If you are on a Nix machine issue:

ssh-keygen -t dsa

Next up, we need to copy the public key to the server. If you are on Linux you can use scp to do this:

cd .ssh/
scp server_user_name@server.address:./

If you are on Windows you could use sftp or similar to transfer the key across. You should end up with a file called in your home directory on the server.

Now, on the server, with your regular user account:

cd .ssh
touch authorized_keys2
chmod 600 authorized_keys2
cat ../ >> authorized_keys2
rm ../

Now, on Windows fire up a PuTTY session specifying the private key under SSH -> Auth. On Nix, simply give:

ssh -l server_user_name server.address

With any luck, you will be sorted for password-less login!