Created
June 17, 2015 19:52
-
-
Save maxclaus/22d8a7d453e4f57e07b3 to your computer and use it in GitHub Desktop.
ssh tunnel and multiple tunnels
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# single tunnel | |
ssh -L <local-ip-on-my-machine>:<local-port-on-my-machine>:\ | |
<local-ip-on-server>:<local-port-on-server> \ | |
-C -N <server-user>@<server-ip> | |
# EXMAPLES | |
# ------------- | |
# SINGLE TUNNEL | |
ssh -L 0.0.0.0:27017:172.17.42.1:27017 -C -N [email protected] | |
# ------------- | |
# MULTIPLE TUNNELS | |
ssh -L 0.0.0.0:27017:localhost:27017 [email protected] \ | |
ssh -L 27017:172.17.42.1:27017 -N [email protected] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment