Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédente | |||
| en:documentation:tutorials:ssh:first_connection [2020/08/25 15:58] – modification externe 127.0.0.1 | en:documentation:tutorials:ssh:first_connection [2023/12/12 12:59] (Version actuelle) – supprimée ltaulell | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | ====== First SSH connection ====== | ||
| - | ===== From ENS network ===== | ||
| - | |||
| - | |||
| - | * To connect to '' | ||
| - | |||
| - | <code bash > | ||
| - | ssh < | ||
| - | </ | ||
| - | |||
| - | ===== From outside of ENS network ===== | ||
| - | |||
| - | * To connect to '' | ||
| - | |||
| - | <code bash> | ||
| - | ssh < | ||
| - | # enter your PSMN password | ||
| - | # then | ||
| - | ssh < | ||
| - | # enter your PSMN password | ||
| - | </ | ||
| - | |||
| - | ===== First connection error message ===== | ||
| - | |||
| - | <WRAP center round important 82%> | ||
| - | At your <wrap em>first attempt to connect to '' | ||
| - | you need to <wrap em> | ||
| - | </ | ||
| - | |||
| - | |||
| - | |||
| - | The following message will appear at your first attempt to connect to '' | ||
| - | |||
| - | < | ||
| - | The authenticity of host ' | ||
| - | RSA key fingerprint is xx: | ||
| - | </ | ||
| - | |||
| - | |||
| - | • To the question: | ||
| - | <code bash>Are you sure you want to continue connecting (yes/ | ||
| - | |||
| - | Answer : <wrap caution> yes</ | ||
| - | ===== Generate SSH keys ===== | ||
| - | |||
| - | <note important> | ||
| - | |||
| - | 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: | ||
| - | |||
| - | <code bash> | ||
| - | ssh-keygen -t rsa | ||
| - | </ | ||
| - | |||
| - | |||
| - | • To the question: | ||
| - | <code bash> | ||
| - | Generating public/ | ||
| - | Enter file in which to save the key (/ | ||
| - | </ | ||
| - | |||
| - | <wrap hi>Hit ENTER</ | ||
| - | |||
| - | • to the questions: | ||
| - | |||
| - | <code bash> | ||
| - | Enter passphrase (empty for no passphrase) : | ||
| - | </ | ||
| - | |||
| - | and | ||
| - | |||
| - | <code bash> | ||
| - | Enter same passphrase again : | ||
| - | </ | ||
| - | |||
| - | <wrap hi>Hit ENTER</ | ||
| - | |||
| - | ===== Keys copy ===== | ||
| - | |||
| - | Then, create the '' | ||
| - | |||
| - | <code bash> | ||
| - | touch ~/ | ||
| - | </ | ||
| - | |||
| - | Next, add your public SSH key ('' | ||
| - | |||
| - | <code bash> | ||
| - | cat .ssh/ | ||
| - | </ | ||
| - | |||
| - | |||
| - | If you already have a pair of SSH authentication keys without password, **copy** the public key (id_rsa.pub) in '' | ||
| - | |||
| - | |||
| - | Besides, if you also have a personal pair of SSH authentication keys (with passphrase), | ||
| - | |||
| - | ===== Minimal configuration ===== | ||
| - | |||
| - | |||
| - | To automate as much as possible connections to machines and compute nodes, create the following configuration file ('' | ||
| - | |||
| - | <code bash ~/ | ||
| - | 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 [[documentation: | ||
| - | |||
| - | Moreover, the list of front machine (connection servers) is available at [[documentation: | ||
| - | |||
| - | |||
| - | ---- | ||
| - | Back to [[en: | ||