Multihop SSH tunneling



In this example we would like to reach the GUI of a router which is not in our LAN and it’s management IP is not routed through the network.

First we create a tunnel between our Laptop and Server1:


We open this session, login to Server1 (the tunnel is built) and start building the second tunnel:

ssh -L 50112: username@

After login the connection is ready.

Now all communication on the Laptop which is destined to will be sent to port 80 of the Router.


Create a free website or blog at

Up ↑