469 shaares
installer sur la machine distante autossh
sudo apt-get install autossh
créer un fichier comme ceci
vi tunnel.sh
/usr/bin/autossh -fN -R 7042:localhost:22 xxxx.monserveurdistant.fr
se connecter à ce serveur
ajouter le id_rsa.pub au fichier authorized_keys
faire un chmod +x de tunnel.sh
puis le lancer au reboot
@reboot