SSH tunneling, or SSH port forwarding, is a method of transporting arbitrary data over an encrypted SSH connection. SSH tunnels allow connections made to a local port (that is, to a port on your own desktop) to be forwarded to a remote machine via a secure channel. There are two types of ssh tunneling. i.e; local port forwarding and remote port forwarding. The diagrams below can help understand ssh tunneling better.