Home > Linux / Unix, Security, Tutorial > SSH Tunnelling

SSH Tunnelling

SSH Tunnelling is an excellent way to tunnel insecure protocols through a secure communication channel. In this example, I’ll tunnel POP3 traffic using SSH. Traditional POP3 traffic, including username and password information, travels clear-text across the network.

The syntax: ssh -f -N -L <local port>:<remote server>:<remote port> <userid>@<remote server>

To tunnel POP3 traffic using ssh:

  1. Make sure an ssh client is installed on your machine and an ssh server is installed on the POP3 server.
  2. Create a local SSH Tunnel on your machine (port 1234 for this example) to the POP3 server’s port 110. You will need to be the root user to bind to “privileged” ports (< 1024).
    # ssh -f -N -L 1234:localhost:110 user@POP3_server
  3. Test the tunnel.
    $ telnet localhost 1234
    You should see the POP3 server’s banner information.est the tunnel.
  4. Configure your mail client to access your mail via POP3 using mail server localhost and port 1234.
  1. No comments yet.
  1. No trackbacks yet.

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: