Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédenteDernière révisionLes deux révisions suivantes | ||
en:documentation:tutorials:ssh:first_connection [2017/12/21 08:54] – [Generate SSH keys] cpetit | en:documentation:tutorials:ssh:first_connection [2020/08/25 15:58] – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
====== First SSH connection ====== | ====== First SSH connection ====== | ||
- | <WRAP center round todo 60%> | + | ===== From ENS network ===== |
- | under construction | + | |
- | </ | + | |
- | At your <wrap em>first attempt to connect to '' | + | * 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> | ||
+ | </ | ||
Ligne 23: | Ligne 45: | ||
===== Generate SSH keys ===== | ===== Generate SSH keys ===== | ||
+ | <note important> | ||
- | Si vous ne disposez pas déjà d'un jeu de clefs SSH sans mot de passe, vous allez le créer la première fois que vous vous connectez | + | If you don't have already a SSH key pair **without** passphrase, you need to create it first time you connect |
- | <code bash> | + | <code bash> |
+ | ssh-keygen -t rsa | ||
+ | </ | ||
- | • To the question: | ||
- | <code bash> | + | • To the question: |
- | Enter file in which to save the key (/ | + | <code bash> |
+ | Generating public/ | ||
+ | Enter file in which to save the key (/ | ||
</ | </ | ||
- | <wrap hi> | + | <wrap hi> |
- | répondez par la touche Enter (réponse par défaut). | + | • to the questions: |
- | + | ||
- | • Aux questions : | + | |
<code bash> | <code bash> | ||
Ligne 50: | Ligne 74: | ||
</ | </ | ||
- | répondez par la touche Enter (réponse par défaut). | + | <wrap hi>Hit ENTER</ |
- | <code bash> | + | ===== Keys copy ===== |
- | • To the question: | + | Then, create |
<code bash> | <code bash> | ||
- | Generating public/ | + | touch ~/.ssh/authorized_keys |
- | Enter file in which to save the key (/ | + | |
</ | </ | ||
- | répondez par la touche Enter (réponse par défaut). | + | Next, add your public SSH key ('' |
- | + | ||
- | • to the questions: | + | |
- | + | ||
- | <code bash> | + | |
- | + | ||
- | and | + | |
<code bash> | <code bash> | ||
- | Enter same passphrase again : | + | cat .ssh/ |
</ | </ | ||
- | répondez par la touche Enter (réponse par défaut) | ||
- | ===== Copie des clefs ===== | + | If you already have a pair of SSH authentication keys without password, **copy** the public key (id_rsa.pub) in '' |
- | Ensuite, pour créer le fichier | + | Besides, if you also have a personal pair of SSH authentication keys (with passphrase), |
- | <code bash> | + | ===== Minimal configuration ===== |
- | puis, ajoutez les clefs publiques (id_? | ||
- | <code bash>cat .ssh/ | + | To automate as much as possible connections to machines and compute nodes, create the following configuration file ('' |
- | Si vous disposez déjà d'un jeu de clef SSH sans mot de passe, copiez les clefs publiques (id_? | + | <code bash ~/ |
- | + | ||
- | Si vous disposez aussi d'un jeu de clefs SSH personnel (avec passphrase), | + | |
- | + | ||
- | ===== Configuration minimum ===== | + | |
- | + | ||
- | Pour automatiser le plus possible les connexions aux machines et noeuds de calcul, créez le fichier de configuration suivant ('' | + | |
- | + | ||
- | <code bash config> | + | |
Host * | Host * | ||
ServerAliveInterval 60 | ServerAliveInterval 60 | ||
ForwardX11Timeout 1d | ForwardX11Timeout 1d | ||
+ | TCPKeepAlive yes | ||
ForwardAgent yes | ForwardAgent yes | ||
- | ForwardX11 yes # | + | ForwardX11 yes # |
- | # ForwardX11Trusted yes # pour MacOSX | + | # ForwardX11Trusted yes # for MacOSX |
Compression yes | Compression yes | ||
StrictHostKeyChecking no | StrictHostKeyChecking no | ||
+ | HashKnownHosts no | ||
</ | </ | ||
- | Vous trouverez **un fichier plus complet** sur la page [[documentation: | ||
+ | You can find ** a more complete file ** on the page [[documentation: | ||
- | ---- | + | Moreover, the list of front machine (connection servers) is available at [[documentation: |
- | Retour à [[documentation: | + | |
+ | ---- | ||
+ | Back to |