Outils pour utilisateurs

Outils du site


ssh

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
ssh [2017/01/07 13:49] – [Générer une clé SSH] simonssh [Date inconnue] (Version actuelle) – supprimée - modification externe (Date inconnue) 127.0.0.1
Ligne 1: Ligne 1:
-====== La commande "ssh" ====== 
  
-La page de [[man de ssh]]. 
- 
-==== Générer une clé SSH ==== 
-<code bash> 
-simon@localhost:~$ ssh-keygen -t rsa -b 8192 
-Generating public/private rsa key pair. 
-</code> 
- 
-On ajoute la nouvelle clé au "ssh-agent" : 
-<code bash> 
-simon@localhost:~$ ssh-add .ssh/id_rsa 
-Could not open a connection to your authentication agent. 
- 
-simon@localhost:~$ ssh-agent bash 
- 
-simon@localhost:~$ ssh-add .ssh/id_rsa 
-Enter passphrase for .ssh/id_rsa:  
-Identity added: .ssh/id_rsa (.ssh/id_rsa) 
-</code> 
- 
-On envoie à présent la clé sur le serveur : 
-<code bash> 
-simon@localhost:~$ ssh-copy-id LOGIN@NOM-DE-DOMAINE.COM 
-/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed 
-/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys 
-LOGIN@NOM-DE-DOMAINE.COM's password:  
- 
-Number of key(s) added: 1 
- 
-Now try logging into the machine, with:   "ssh 'LOGIN@NOM-DE-DOMAINE.COM'" 
-and check to make sure that only the key(s) you wanted were added. 
-</code> 
- 
-Plus qu'à se connecter, sans rentrer de code cette fois : 
-<code bash> 
-simon@localhost:~$ ssh LOGIN@NOM-DE-DOMAINE.COM 
-LOGIN@HOST~$ 
-</code> 
- 
-=== Changer la passphrase d'une clé SSH === 
- 
-<code bash> 
-$ cd .ssh/ 
-$ ssh-keygen -f id_rsa -p 
-Enter old passphrase:  
-Key has comment 'rsa w/o comment' 
-Enter new passphrase (empty for no passphrase):  
-Enter same passphrase again:  
-Your identification has been saved with the new passphrase. 
-</code> 
-[[https://www.cyberciti.biz/faq/howto-ssh-changing-passphrase/|source (cyberciti.biz)]] 
- 
-==== Exemples et astuces ==== 
- 
-  * [[Redirection de l'affichage via X]] 
-  * [[Reverse SSH]], pour intervenir à distance sur un ordinateur derrière un NAT. 
-  * [[http://links.simonlefort.be/?gmvu_g|Streaming avec mplayer]] 
ssh.1483796976.txt.gz · Dernière modification : 2020/08/09 12:59 (modification externe)