Ceci est une ancienne révision du document !


First SSH connection

From ENS network

  • To connect to allo-psmn from the ENS network, simply type in a terminal the following command:
ssh <mylogin>@allo-psmn.psmn.ens-lyon.fr

From outside of ENS network

  • To connect to allo-psmn from outside of the ENS network, you first need to connect to ssh.psmn.ens-lyon.fr in order to access the ENS network. Then connect to allo-psmn. In a terminal, type the following commands:
ssh <mylogin>@ssh.psmn.ens-lyon.fr
# enter your PSMN password
# then 
ssh <mylogin>@allo-psmn.psmn.ens-lyon.fr
# enter your PSMN password

First connection error message

At your first attempt to connect to allo-psmn (either from the ENS network or from outside), you need to strictly follow these instructions !

The following message will appear at your first attempt to connect to allo-psmn:

The authenticity of host 'allo-psmn.ens-lyon.fr (140.77.144.90)' can't be established. 
RSA key fingerprint is xx:lots:of:caracters:ascii:xx:xx.

• To the question:

Are you sure you want to continue connecting (yes/no)?

Answer : yes

Generate SSH keys

WARNING: This step provide a key pair without passphrase, for job submission. This key pair MUST NOT leave PSMN. It is equivalent to a master key on your home.

If you don't have already a SSH key pair without passphrase, you need to create it first time you connect (In order to simplify the computation system, you must have a PSMN's SSH key pair without passphrase). Strictly follow these CLI instructions:

ssh-keygen -t rsa

• To the question:

Generating public/private rsa key pair.
Enter file in which to save the key (/home/votrelogin/.ssh/id_rsa) :

Hit ENTER (default answer)

• to the questions:

Enter passphrase (empty for no passphrase) :

and

Enter same passphrase again :

Hit ENTER (default answer)

Keys copy

Then, create the ~/.ssh/authorized_keys file by typing:

touch ~/.ssh/authorized_keys

Next, add your public SSH key (id_rsa.pub) to the ~/.ssh/authorized_keys file:

cat .ssh/id_rsa.pub >> ~/.ssh/authorized_keys

If you already have a pair of SSH authentication keys without password, copy the public key (id_rsa.pub) in ~/.ssh/authorized_keys.

Besides, if you also have a personal pair of SSH authentication keys (with passphrase), you can add your personal SSH public key (id_rsa.pub) to the ~/.ssh/authorized_keys file.

Minimal configuration

To automate as much as possible connections to machines and compute nodes, create the following configuration file (~/.ssh/config) :

~/.ssh/config
Host *
  ServerAliveInterval 60
  ForwardX11Timeout 1d
  TCPKeepAlive yes
  ForwardAgent yes
  ForwardX11 yes         # for Linux
#  ForwardX11Trusted yes # for MacOSX
  Compression yes
  StrictHostKeyChecking no
  HashKnownHosts no

You can find a more complete file on the page Example of SSH configuration.

Moreover, the list of front machine (connection servers) is available at the following page.


Back to SSH connection to front machines

en/documentation/tutorials/ssh/first_connection.1598371112.txt.gz · Dernière modification : 2020/08/25 15:58 de 127.0.0.1