Created
July 15, 2015 03:39
-
-
Save chriszarate/bc34b7378d309f6c3af5 to your computer and use it in GitHub Desktop.
VNC over SSH via bastion
This file contains hidden or 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
# You want to VNC to Box A but you don't have access to it | |
# over public Internet. You do have SSH access to Box B in | |
# the same private network. | |
# firewall | |
# ┌─────┐ ╏╏ ┌─────┐ | |
# │ You │──SSH──╏╏────│ B │ bastion | |
# └─────┘ ╏╏ └──┬──┘ | |
# ╏╏ SSH | |
# ╏╏ ┌──┴──┐ | |
# ╏╏ │ A │ VNC target | |
# ╏╏ └─────┘ | |
# On Box B (via ssh) | |
ssh -N -L 5001:localhost:5900 user@boxA | |
# On your local machine | |
ssh -N -L 5900:localhost:5001 boxB | |
# On your local machine, you can now VNC to Box A with | |
# vnc://localhost (using Safari/Finder/VNC app) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment