Skip to content

Instantly share code, notes, and snippets.

@patricksuo
Last active September 14, 2016 10:35
Show Gist options
  • Save patricksuo/5d550c7884955f62c42407505093ac7e to your computer and use it in GitHub Desktop.
Save patricksuo/5d550c7884955f62c42407505093ac7e to your computer and use it in GitHub Desktop.
# 由于公司VPN就是一坨💩
# http://superuser.com/questions/458730/keep-ssh-port-forwarding-connection-alive
while true; do
{ while true; do echo echo ping; sleep 10; done } | \
ssh -R 5555:localhost:22 user@remotehost -o ExitOnForwardFailure=yes -v
sleep 10
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment