Last active
April 19, 2019 17:05
-
-
Save ryan-beisner/ef0d5a7473c0962e2f9d692d356097cd to your computer and use it in GitHub Desktop.
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
Local laptop = FOO | |
Remote server = BAR | |
VM inside remote server = CAT | |
Let's say the BAR server has something listening on port 80 and you want to | |
get to that from FOO, your local laptop's web browser. | |
From FOO: | |
ssh ubuntu@BAR | |
(holding the right-shift key, hit tilde, capital C): ~C | |
You will see a "ssh>" console prompt appear, where you can make special | |
on-the-fly ssh commands. One of those could be a port forward! | |
-L 10080:CAT:80 | |
Now on your local laptop, FOO, point your web browser at: | |
http://localhost:10080 | |
And you should see the remote web server. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment