ubuntu logo

Ubuntu: ssh tunnel to a remote server port

Spread the love

I have just set up ssh tunneling for a client to a remote port on a remote server behind a firewall.

Set up ssh tunnel:

This can be done really simply on ubuntu by running the following command:

In this example I am forwarding port 3333 to port 1521 the vm 10.0.0.2 by sshing to the server 1.2.3.4 with the user user:

ssh -L 3333:10.0.0.2:1521 -N -f user@1.2.3.4

The server will then be able to connect to port 1521 on the remote server 10.0.0.2 by connecting to local port 3333.

Leave a Comment

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

Scroll to Top