SSH []

Outils pour utilisateurs

Outils du site


SSH

Ceci est une ancienne révision du document !


SSH

Clef publiques / privées

$ ssh-keygen -t rsa -b 4096

Connexion avec clefs

Copier la clef publique sur la machine de destination

$ ssh-copy-id -i .ssh/id_rsa.pub <machine de destination>

You need to use an ssh agent. Short answer: try

$ ssh-add

Supply your passphrase when asked.

If you aren't already running an ssh agent you will get the following message:

Could not open a connection to your authentication agent.

In that situation, you can start one and set your environment up thusly

eval $(ssh-agent)

Then repeat the ssh-add command.

Raccourci de connexion

Pour nous connecter sur le serveur très rapidement, nous allons créer en local un fichier de configuration avec ses coordonnées :

nano ~/.ssh/config

On y indique les données suivantes :

Host <shortcut>
  HostName <hostname>
  Port <port>
  User <user>
  IdentityFile ~/.ssh/<user>

Pour se connecter, il suffit désormais de taper :

ssh <shortcut>
documentation/informatique/linux/ssh/index.1548248856.txt.gz · Dernière modification : de f1sls