Skip to content

Instantly share code, notes, and snippets.

@mattb mattb/gist:8462540
Created Jan 16, 2014

What would you like to do?
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 limit 5 60
exec autossh -M 0 -N -R 10000: -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
You can’t perform that action at this time.