I dislike openssh, and I recommend everyone who asks to use the real thing. (Download here)

This is a simple guide to how to setup passwordless login with the "real thing".
1: Generate public/private key-pairs like this.

ssh-keygen2 -b 2048 -t rsa
That gives you two files (in ~/.ssh2).
id_rsa_2048_bla
id_rsa_2048_bla.pub
Rename them to something useful, for example:
mv id_rsa_2048_bla server
mv id_rsa_2048_bla.pub server.pub
And of course the same for the "client".

2: Configure the client/workstation.

echo "IdKey client" > ~/.ssh2/identification
3: Copy client.pub to the server machine
scp ~/.ssh2/client.pub user@server_ip:.ssh2/
4: Configure the server
echo "Key client.pub" > ~/.ssh2/authorization
5: Enjoy the power of the true ssh!

Some short words

  • Make sure you dont overwrite any of the identification or authorization files if they matter to you.
  • You can of course add more than one "Key clientname.pub" like to the servers authorization file.
  • If you are about to login to more than one server, dont regenerate the keys on "client" all the time.
  • Back to index