SSH Local Port Forwarding Made Easy

I’ve been using this for a while now, and have found it a great little trick for accessing services that are blocked due to a firewall.

It’s pretty simple, you just have a few parts to the command string.ย  The first command argument tells ssh to forward a local port (LP) to a remote machine Remote) on a remote port (RP).ย  The second part is something you’re probably familiar with, the destination that you’re connecting to (Destination).

An example with the abbreviations above would be:

Say for example, you ran the command “ssh -L 1234:myInternalServer.com:80 myExternalServer”.ย  In order to access port 80 on myInternalServer.com you’d open up your web browser and point it to http://localhost:1234.ย  It’s as easy as that!

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright VirtJunkie.com ยฉ 2024