Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
Dernière révisionLes deux révisions suivantes
en:documentation:tutorials:ssh:first_connection [2017/12/21 09:08] – [Copie des clefs] cpetiten: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+ 
 + 
 +  * To connect to ''allo-psmn'' from the ENS network, simply type in a terminal the following command: 
 + 
 +<code bash > 
 +ssh <mylogin>@allo-psmn.psmn.ens-lyon.fr 
 +</code> 
 + 
 +===== 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:  
 + 
 +<code bash> 
 +ssh <mylogin>@ssh.psmn.ens-lyon.fr 
 +# enter your PSMN password 
 +# then  
 +ssh <mylogin>@allo-psmn.psmn.ens-lyon.fr 
 +# enter your PSMN password 
 +</code> 
 + 
 +===== First connection error message ===== 
 + 
 +<WRAP center round important 82%> 
 +At your <wrap em>first attempt to connect to ''allo-psmn''</wrap> (either from the ENS network or from outside),  
 +you need to <wrap em>strictly follow these instructions </wrap> !
 </WRAP> </WRAP>
  
- 
-At your <wrap em>first attempt to connect to ''allo-psmn''</wrap> (either from the ENS network or from outside), you need to <wrap em>strictly follow these instructions </wrap> ! 
  
  
Ligne 23: Ligne 45:
 ===== Generate SSH keys ===== ===== Generate SSH keys =====
  
 +<note important>**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.</note>
  
-Si vous ne disposez pas déjà d'un jeu de clefs SSH sans mot de passevous allez le créer la première fois que vous vous connectez (pour simplifier le fonctionnement du système de calculsvous devez disposer d'un jeu de clefs SSH sans mot de passe). Tapez les lignes de commande suivantes : +If you don't have already a SSH key pair **without** passphraseyou need to create it first time you connect (In order to simplify the computation systemyou **must** have a PSMN'SSH key pair **without** passphrase). Strictly follow these CLI instructions:
- +
-<code bash>ssh-keygen -t dsa</code> +
- +
-• To the question: +
- +
-<code bash>Generating public/private dsa key pair+
-Enter file in which to save the key (/home/votrelogin/.ssh/id_dsa) : +
-</code> +
- +
-<wrap hi>Hit ENTER</wrap> (default answer) +
- +
- +
- +
-• To the questions : +
- +
-<code bash> +
-Enter passphrase (empty for no passphrase) +
-</code> +
- +
-and  +
- +
-<code bash> +
-Enter same passphrase again : +
-</code> +
- +
-<wrap hi>Hit ENTER</wrap> (default answer) +
- +
-• Then type:+
  
 <code bash> <code bash>
Ligne 81: Ligne 76:
 <wrap hi>Hit ENTER</wrap> (default answer) <wrap hi>Hit ENTER</wrap> (default answer)
  
-===== Copie des clefs =====+===== Keys copy =====
  
 Then, create the  ''~/.ssh/authorized_keys'' file by  typing: Then, create the  ''~/.ssh/authorized_keys'' file by  typing:
Ligne 89: Ligne 84:
 </code> </code>
  
-Next, +Next, add your public SSH key (''id_rsa.pub'') to the ''~/.ssh/authorized_keys'' file: 
-add your public SSH keys (''id_?sa.pub'') to the ''~/.ssh/authorized_keys'' file:+ 
 +<code bash> 
 +cat .ssh/id_rsa.pub >> ~/.ssh/authorized_keys 
 +</code> 
 + 
 + 
 +If you already have a pair of SSH authentication keys without password, **copy** the public key (id_rsa.pub) in ''~/.ssh/authorized_keys''.
  
-<code bash>cat .ssh/id*.pub >> ~/.ssh/authorized_keys</code> 
  
-Si vous disposez déjà d'un jeu de clef SSH sans mot de passecopiez les clefs publiques (id_?sa.pubdans le fichier ''~/.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.pu''bto the ''~/.ssh/authorized_keys'' file.
  
-Si vous disposez aussi d'un jeu de clefs SSH personnel (avec passphrase), vous pouvez ajouter votre clef publique (id_?sa.pub) au fichier ''~/.ssh/authorized_keys''.+===== Minimal configuration =====
  
-===== Configuration minimum ===== 
  
-Pour automatiser le plus possible les connexions aux machines et noeuds de calculcréez le fichier de configuration suivant (''~/.ssh/config'') :+To automate as much as possible connections to machines and compute nodescreate the following configuration file (''~/.ssh/config'') :
  
-<code bash config>+<code bash ~/.ssh/config>
 Host * Host *
   ServerAliveInterval 60   ServerAliveInterval 60
   ForwardX11Timeout 1d   ForwardX11Timeout 1d
 +  TCPKeepAlive yes
   ForwardAgent yes   ForwardAgent yes
-  ForwardX11 yes         # pour Linux +  ForwardX11 yes         # for Linux 
-#  ForwardX11Trusted yes # pour MacOSX+#  ForwardX11Trusted yes # for MacOSX
   Compression yes   Compression yes
   StrictHostKeyChecking no   StrictHostKeyChecking no
 +  HashKnownHosts no
 </code> </code>
  
-Vous trouverez **un fichier plus complet** sur la page [[documentation:tutorials:ssh:clef_agent_ssh&#exemple_de_configuration_pour_linux_et_bsd|Exemple de configuration SSH]], et la liste des serveurs de connexion du PSMN est disponible [[documentation:clusters:services#serveurs_de_compilation|sur cette page]]. 
  
 +You can find ** a more complete file ** on the page [[documentation:tutorials:ssh:clef_agent_ssh&#exemple_de_configuration_pour_linux_et_bsd|Example of SSH configuration]].
  
-----+Moreover, the list of front machine (connection servers) is available at [[documentation:clusters:services#serveurs_de_compilation|the following page]].
  
-Retour à [[documentation:tutorials:ssh:accueil|Se connecter aux clusters avec SSH]]+ 
 +---- 
 +Back to  [[en:documentation:tutorials:ssh:accueil|SSH connection to front machines]]