What is Sshuttle and How does it work?

Sshuttle is a python based tool utilising the tunnel connection option through SSH in an incredibly efficient way as opposed to traditional SSH proxying. Making use of the tunnel connection option within SSH create a connection very similar VPN since it can forward every port on an entire network, not just the ports you manually configuring in traditional SSH port forwarding.

However, the key difference between Sshuttle and a VPN is the use of stateless connections; VPNs forward packets one at a time and doesn't concern itself about individual connections. Sshuttle works differently, its stateful and keeps track of every connection.

Installing Sshuttle

1. apt-get install sshuttle

Using Sshuttle

1. sshuttle -r username@sshserver <IP range>

Using the remote IP range DNS server

1. sshuttle --dns -r username@sshserver <IP range>

Using sshuttle with a private SSH key

1. sshuttle -r user@172.16.0.5 --ssh-cmd "ssh -i private_key" 172.16.0.0/24