Navigate / search

Instructions to generate a keypair

Use the following instructions if you do not want to enter your password every time you use ssh or scp to login to the nodes from boltzmann.

Use the following steps to generate an RSA key pair: one public and one private. Never distribute your private key to anyone and always keep it in the machine from where you want to connect, in this case boltzmann (to connect to the nodes) or your personal machine (to connect to boltzmann). You will not be able to connect to the nodes directly.

To generate an RSA key pair type the following command at a shell prompt in boltzmann:

ssh-keygen -t rsa

Accept the default file location of  ~/.ssh/id_rsa. Do not enter a passphrase (press Enter) if you don’t want to be prompted when you login to the nodes. The public key is written to ~/.ssh/id_rsa.pub. The private key is written to ~/.ssh/id_rsa.

To be sure, change the permissions of the .ssh directory using the following command:

chmod 755 ~/.ssh

Copy the contents of ~/.ssh/id_rsa.pub into the file ~/.ssh/authorized_keys with following command:

cp  ~/.ssh/id_rsa.pub  ~/.ssh/authorized_keys

Change the permissions of the authorized_keys file using the following command:

chmod 644 ~/.ssh/authorized_keys

Your home directory is already seen on all nodes, so you don’t have to copy the authorized_keys file to every node.

Now you should be able to login to to the nodes from boltzmann without be prompted for your password.

If you want to use the same key pair to login to boltzmann from your personal computer, you have yo copy the private key (~/.ssh/id_rsa) to your computer. Check with your ssh client software how to use it.