Ssh Tunneling Explained

Excellent post of https://goteleport.com/blog/ssh-tunneling-explained/

What is SSH tunneling

https://goteleport.com/blog/images/2021/ssh-tunnel/ssh-tunnel.png

For example, during shell access, the data transmitted are binary streams detailing dimensions of pseudo-terminal and ASCII characters to run commands on the remote shell. However, during SSH port forwarding, the data transmitted can be a binary stream of protocol tunneled over SSH (e.g. SQL over SSH). So SSH tunneling is just a way to transport arbitrary data with a dedicated data stream (tunnel) inside an existing SSH session. This can be achieved with either local port forwarding, remote port forwarding, dynamic port forwarding, or by creating a TUN/TAP tunnel.

Written on December 30, 2021