You need to generate a so-called key pair for yourself, consisting of a private key (your digital identity stored on the client machine) and a matching public key (located on the server machine). If you have a Macintosh running Mac OS X or another UNIX box equipped with OpenSSH, do the following:

Generate the key pair: Start a terminal application and run the command

ssh-keygen -t rsa

and follow the instructions. This will create two new files in the directory ~/.ssh on the client called id_rsa holding your private key and id_rsa.pub with the corresponding public key. Protecting your private key with a password in the procedure just outlined is optional if you can be sure that the key is protected by other means, otherwise it’s a must.

Copy the public key to the login server, this time still using password authentication:

scp ~/.ssh/id_rsa.pub userName@afpserver.cpfs.mpg.de:.ssh/authorized_keys

(Replace userName with your login name on the server.) Note that this requires the directory ~/.ssh to exist on the login server.

Log in to the server a last time with password authentication, and make sure the permissions on the file created in the previous step are correct:

chmod 755 ~/.ssh ; chmod 644 ~/.ssh/authorized_keys

If you are using client software other than OpenSSH, like MacSSH or NiftyTelnet, please refer to the documentation of your client on how to generate and distribute the two keys needed.