One reason to use a tunnel is to access some service across the internet. One way to do that is via a SSH tunnel. Assume you have ptop running on a remote server on port 3000. ptop produces html graphs and data which you want to access locally. You can access the data securely in two easy steps.
The command is
ssh -L bind_address:port:host:hostport
which specifies that the given port (1234) on the local (client) host is to be forwarded to the given host and port (3000) on the remote side. Whenever a connection is made to port 1234, the connection is forwarded over the secure channel, and a connection is made to host hostport on the remote machine. The bind_address of "localhost" indicates that the listening port be bound for local use only.
A SSH tunnel requires no additional software to be installed on either the server or the client, unlike openvpn.
![]() |
This site best viewed with a browser |
| Warning: This is a Debian centric site | |
| Many thanks to Debra and Ian Murdock for making Debian possible | |
| First created Apr 22, 2008 ~ Last revised February 03, 2010 |