Skip to content

Instantly share code, notes, and snippets.

@Mohitsharma44
Last active July 27, 2017 19:39
Show Gist options
  • Save Mohitsharma44/ee62404f2dfaed53ae1b9b5ae8616c89 to your computer and use it in GitHub Desktop.
Save Mohitsharma44/ee62404f2dfaed53ae1b9b5ae8616c89 to your computer and use it in GitHub Desktop.
Aassuming you have already setup password-less (or key-based) login to gw and compute, use this to have an "always-up" tunnel to compute. Install autossh using homebrew (for mac) or apt-get (for debian / ubuntu)
autossh -M 0 -f -N -C -L 2222:compute:22 gw.cusp.nyu.edu -o "ServerAliveCountMax=3" -o "ServerAliveInterval=10" -o "ExitOnForwardFailure=yes"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment