Tag Archives: ssh tunnel

SSH Tunnel

The other day I came across the need to setup an SSH Tunnel for remote management.  The idea of using an SSH tunnel is that the data going through the tunnel is encrypted.  So an extra layer of security.

This post assumes you know how to do basic networking, setup an ssh server, and reasonable computer skills.

First step is to setup an SSH server within the network you want to tunnel into.

Second allow for the SSH server to be connected to from the outside.

Now the fun begins:

Get outside of your network.

Install an ssh client

Now lets pretend you want to tunnel in and connect to your internal web server.

In a terminal window type the below command.

ssh -L 80:internalwebserver:80 -l username sshserver

Once you enter your password, go to your web browser and go to http://localhost

You should have been directed to your internal web server.

Congratulations you have setup your first successful SSH Tunnel.