Created
January 16, 2014 20:12
-
-
Save mattb/8462540 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description "autossh tunnel" | |
author "Joni Kähärä " | |
start on (local-filesystems and net-device-up IFACE=eth0 and net-device-up IFACE=eth1) # assuming we have multiple interfaces | |
stop on runlevel [016] | |
respawn | |
respawn limit 5 60 | |
exec autossh -M 0 -N -R 10000:192.168.1.1:22 -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -o "StrictHostKeyChecking=no" -o "BatchMode=yes" -i /home/user/.ssh/id_rsa username@hostname |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment