Outils du site

Enfant prodige follement doué pour les mathématiques (elle peut diviser 32 427 par 16 sans cesser de sauter la corde), Helen Baxter, une petite New-Yorkaise de 11 ans, pose de graves problèmes à ses parents et ses professeurs. Quand on l'interroge sur son avenir, elle déclare quelle veut être gardeuse de vaches dans un grand pré avec plein de pommiers en fleur . [Pierre Desproges]

04-linux:30-ssh:12-config

Ceci est une ancienne révision du document !


SSH config

man ssh config https://linux.die.net/man/5/ssh_config

https://www.cyberciti.biz/faq/create-ssh-config-file-on-linux-unix/

Créer un fichier ~/.ssh/config pour définir ….

Le fichier config contient un ensemble règles définies par des paires clé-valeur :


<code>
# syntaxe 1
config1 value1 value2
# syntaxe 2 équivalente
config1=value1 value2

Les clés les plus utilisées :

clé valeur
Host Restricts the following declarations (up to the next Host or Match keyword) to be only for those hosts that match one of the patterns given after the keyword. If more than one pattern is provided, they should be separated by whitespace.
HostName Specifies the real host name to log into.
User Specifies the user to log in as. This can be useful when a different user name is used on different machines. This saves the trouble of having to remember to give the user name on the command line.
IdentityFile Specifies a file from which the user's DSA, ECDSA, Ed25519 or RSA authentication identity is read. The default is ~/.ssh/id_dsa, ~/.ssh/id_ecdsa, ~/.ssh/id_ed25519 and ~/.ssh/id_rsa.
LocalForward Specifies that a TCP port on the local machine be forwarded over the secure channel to the specified host and port from the remote machine.

Exemple :

Host nas01
     HostName 192.168.1.100
     User root
     IdentityFile ~/.ssh/nas01.key
/etc/ssh/ssh_config : This files set the default configuration for all users of OpenSSH clients on that desktop/laptop and it must be readable by all users on the system.
Dernière modification : 2019/08/23 18:37