Skip to content

Instantly share code, notes, and snippets.

@johnkmj
Created January 18, 2017 17:23
Show Gist options
  • Save johnkmj/8bb18889aa3dccb1b70f37935b4ef2e2 to your computer and use it in GitHub Desktop.
Save johnkmj/8bb18889aa3dccb1b70f37935b4ef2e2 to your computer and use it in GitHub Desktop.
1-liner command to initiate and maintain a ssh tunnel. Replace with correct info. Pop in crontab -e
@reboot while true; do sleep 10; autossh -M 10985 -i ~/.ssh/id_rsa_new -f -N -R 0.0.0.0:1337:localhost:1337 root@212.47.252.178; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment