objectif
Simplifier des accès complexes via bastions et appliquer des réglages conditionnels.
code minimal
# ~/.ssh/config
Host bastion
HostName bastion.data.pm
User ops
Host app-*
User deploy
IdentityFile ~/.ssh/id_ed25519
ProxyJump bastion
Match host "app-*" exec "test %r = deploy"
ServerAliveInterval 30
ServerAliveCountMax 3
utilisation
ssh app-01
variante(s) utile(s)
# ProxyCommand (fallback ancien OpenSSH)
Host app-*
ProxyCommand ssh -W %h:%p bastion
notes
ProxyJumpsimplifie le chaînage;Matchpermet des règles ciblées.- combinez avec ControlMaster/ControlPersist (voir snippet multiplexage SSH).