Skip to content

Instantly share code, notes, and snippets.

@thinktainer
Created August 28, 2019 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thinktainer/11c6b5f4fe444ea8d09e6cab4549d739 to your computer and use it in GitHub Desktop.
Save thinktainer/11c6b5f4fe444ea8d09e6cab4549d739 to your computer and use it in GitHub Desktop.
case $1 in
start)
autossh -f -M 0 -Nn -D 127.0.0.1:2431 jumpbox.prod.gcp.uw.systems
autossh -f -M 0 -Nn -D 127.0.0.1:2430 jumpbox.dev.gcp.uw.systems
autossh -f -M 0 -Nn -D 127.0.0.1:2429 jumpbox.prod.uw.systems
autossh -f -M 0 -Nn -D 127.0.0.1:2428 jumpbox.dev.uw.systems
;;
stop)
ps aux | rg 'autossh.*uw\.systems' | cut -d ' ' -f 2 | xargs kill
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment