How to set up and enable a passwordless SSH login to mésocentre

The procedure takes place in two steps :

Generate ssh keys

The procedure of setting up the SSH keys and SSH client is different on different systems.

The OpenSSH utilities are already installed at the majority of GNU/Linux distributions and MacOS, you only have to generate the key pair:

$ ssh-keygen -t rsa -b 4096 -o -a 128

The generated public key is available in the user’s .ssh directory and can be identified by its .pub suffix.

Under Windows, open the Settings menu. Select Apps > Apps & features, then Optional features.

Scan the list to see if OpenSSH is already installed. If not, select Add Feature at the top of the page, then find OpenSSH Client and click Install.

Once the OpenSSH client is installed, run the following command from a PowerShell or cmd prompt:

$ ssh-keygen -t rsa -b 4096 -o -a 128

More information about OpenSSH is available here.

An alternative is to install Linux on Windows with WSL.

Transmit the public key to the mesocentre

Before being able to connect to the mesocentre, you must transmit the public key that you have just generated on the management interface : copernicus.. Use the “Upload SSH key” button.

The new key will be added to the previously existing ones.

SSH access to the computing nodes:

When using slurm in interactive mode, you may need to connect to another computing nodes via SSH.
You can simplify this operation by generating yet another ssh key on login nodes and to add it to the your authorized_keys file.

After you have connected to the login node, please, type the command to create the SSH keys:

[identifiant@login01 ~]$ ssh-keygen -t rsa -b 4096 -o -a 128

If you haven’t changed the default directory during creation of key pair process then copy the keys using this command:

[identifiant@login01 ~]$ cat ~/.ssh/ >> ~/.ssh/authorized_keys

Otherwise you have to add the content of the file to ~/.ssh/authorized_keys

Dernière mise à jour : 2 March 2023

+33 (0)4 13 94 58 29 / (0)4 13 94 58 27