autossh

Lance, surveille et redémarre les connections SSH. Reconnecte automatiquement pour garder le tunnel de transfert de port ouvert. Accepte toutes les options de SSH. Plus d'informations : https://manned.org/autossh.

autossh -M {{port_surveillé}} "{{commande_ssh}}"

autossh -M {{port_surveillé}} -L {{port_local}}:localhost:{{port_distant}} {{utilisateur}}@{{hôte}}

autossh -f -M {{port_surveillé}} -N "{{commande_ssh}}"

autossh -f -M 0 -N -o "ServerAliveInterval 10" -o "ServerAliveCountMax 3" "{{commande_ssh}}"

autossh -f -M 0 -N -o "ServerAliveInterval 10" -o "ServerAliveCountMax 3" -o ExitOnForwardFailure=yes -L {{port_local}}:localhost:{{port_distant}} {{utilisateur}}@{{hôte}}

AUTOSSH_DEBUG=1 AUTOSSH_LOGFILE={{chemin/vers/fichier_logs_autossh.log}} autossh -f -M {{port_surveillé}} -v -E {{chemin/vers/fichier_logs_ssh.log}} {{commande_ssh}}