Skip to content

Instantly share code, notes, and snippets.

@xiaom
Last active Aug 29, 2015
Embed
What would you like to do?
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