Creating an ssh tunnel

written on 2009-01-20

Setting up a host for a server in the ssh config and creating an ssh tunnel.

For this your would have to have access to a server. Open your ssh configuration in a text editor.

gedit ~/.ssh/config

Add the server specifications.

Host host
HostName path.to.server.com
User username

Create an ssh tunnel.

ssh host -L8080:127.0.0.1:8080

Now you can reach host as if it were 127.0.0.1 (localhost). "-L8080" stands for your local host, "127.0.0.1:8080" stands for what you are on the other side of the tunnel.

To close the tunnel.

exit

Pagination