Ceci est une ancienne révision du document !
$ ssh-keygen -t rsa -b 4096
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 before pushing. 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.
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>