#/etc/systemd/system/autossh.service # cf: http://nlug.ml1.co.uk/2016/03/resilient-ssh-with-autossh-andor-systemd/5148 [Unit] Description=AutoSSH tunnel service port 7777 After=network.target [Service] Environment="AUTOSSH_GATETIME=0" Environment="AUTOSSH_DEBUG=1" ExecStart=/usr/bin/autossh -M 0 -N -T -q -o ServerAliveInterval=30 -o ServerAliveCountMax=3 -o "PubkeyAuthentication=yes" -o "PasswordAuthentication=no" -i /root/.ssh/andaines_jodaille -R 7777:localhost:22 jobeeuser@jodaille.org -p 22 [Install] WantedBy=multi-user.target