SSH tunnel tutorial

Hi,

I created a tutorial with Wink that shows how to create an SSH tunnel. In this example, I'll be connecting, using ssh, to a host called server.mydomain.com. Through the tunnel, I'll connect to "destinationhost" on port 8080. This can be usefull if destinationhost only allows connection on port 8080 from the server I'm connecting to using SSH.

To setup the tunnel, I simply open the SSH connection. When I want to access the web site located at destinationserver.other.com:8080, I simply enter "localhost:8081" in my browser.

Here is the wink tutorial.

An SSH tunnel can be used for many reasons:

  • Send or read your e-mails using an insecure protocol (POP3/IMAP/SMTP), through an encrypted tunnel
  • Encrypt your HTTP traffic while in an internet cafe, using a tunnel and a proxy (like squid)
  • Access a host that is behind a firewall (as long as you have access via SSH to another host behind this firewall
BTW, this may be against the policy of the organization, so please check with the sysadmin before doing that.

Comments

Dragos said…
Great tutorial!

For the more text and image loving readers, and for those who do not like flash format, I wrote a simple tutorial here:
http://picobit.wordpress.com/2009/04/26/linux-ssh-forwarding-tunneling-duble-ssh-using-the-console/

Popular posts from this blog

General linux performance troubleshooting

Asterisk works under OpenVZ (no zaptel)