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.

Advertisements

One response to “SSH Tunnel

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: