Created
June 17, 2015 19:52
-
-
Save maxcnunes/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 core@192.168.0.100 | |
# ------------- | |
# MULTIPLE TUNNELS | |
ssh -L 0.0.0.0:27017:localhost:27017 core@192.168.0.100 \ | |
ssh -L 27017:172.17.42.1:27017 -N core@192.168.0.101 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment