If you ever have a web server (or other type of server) running on a remote Linux box, and you want to connect to it using your local system, here’s how you do it.
ssh -i ./.ssh/key.pem -N -L 8081:localhost:8000 [email protected]
This reads as:
- Authenticate using a key.
- The port you’re listening on on your local system is
- The port you’re listening on on your remote Linux box is
- You’re connecting as [email protected]
Then you just go to your browser and browse to:
localhost:8081, and you’ll be touching the local port 8000 on the remote box.
Hope it helps someone.