Local port forwarding over SSH
20 Oct 2012
You need to connect to the server dstServer:dstPort. Access to this server is denied by firewall for your PC network. But you have access to the server jumpServer by SSH which can connect to the server dstServer:dstPort.
Let's do local port forwarding over SSH in order to get access to the server dstServer:dstPort from your PC.
Example of use.
$ ssh -l username -i /path/to/identity_file -f -N -L 8080:dstServer:dstPort -p22 jumpServer
So your network connection will be forwarded over jumpServer to the server dstServer:dstPort when you connect to the local port 8080.