A public and private key pair with no passphrase will be automaticly created when you login
to Shark and there is no .ssh directory. If your SSH key pair does not work any more just delete
your .ssh directory, log out and back in again, then the SSH key pair will be created again.
Configuring public key authentication
Without any configuration, connecting to any worker node from the head node (e.g., qlogin
) will require password authentication. It is more convenient to use public key authentication, especially if you're using qmake
.
To create a private/public key pair your self, type (on the head node):
ssh-keygen -t rsa -C "your.email@lumc.nl on shark"
You'll be asked for a passphrase (twice), which you probably want to leave empty (just press enter).
Note: It is usually good practice to use a passphrase. However, on Shark this is quite inconvenient.
After that (still on the head node):
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod go-rw ~/.ssh/authorized_keys
You can test your configuration by running qlogin
. If everything works properly, you will not be asked for a password.