SSH Tunneling

SSH Tunneling is also known as Port Forwarding is a way to forward insecure TCP traffic through SSH Secure Shell. For an example, we can make a secure POP3 access by forwarding non-standard local port to remote POP3 port using SSH.

ssh -f user@mail-server -L 2000:localhost:110 -N

-f –> Requests ssh to go to background just before command execution
-L –> port:host:hostport -> Specifies that the given port on the local (client) host is to be forwarded to the given host and port on the remote side.
-N –> Do not execute a remote command. This is useful for just forwarding ports.Read More