Skip to content

Instantly share code, notes, and snippets.

@xiaom
Last active August 29, 2015 13:56
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 xiaom/8894972 to your computer and use it in GitHub Desktop.
Save xiaom/8894972 to your computer and use it in GitHub Desktop.
ssh tunnel connection
# Let us assume
#
# - you have a laptop A
# - you work at company C
#
# how can you access C from A?
#
# Solution: a middle man B
#
# http://www.revsys.com/writings/quicktips/ssh-tunnel.html
C $ ssh -R 19999:localhost:22 xiaom@A.hostname
C $ ssh -f xiaom@A.hostname -L 2000:A.hostname:25 -N
ssh -f xiaom@bison.westgrid.ca -L 19999:bison.westgrid.ca:25 -N
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment