> For the complete documentation index, see [llms.txt](https://lswsec.gitbook.io/lswsec-offensive/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lswsec.gitbook.io/lswsec-offensive/pivoting/sshuttle.md).

# sshuttle

* simulates a vpn allowing us to route traffic through the proxy without the use of proxychains
* only works on linux
* requires a compromised ssh serve with python installed
* base command for connecting to a server&#x20;
  * sshuttle -r username\@address subnet
  * For example sshuttle -r user\@172.16.0.5 172.16.0.0/24
  * -N attempts to determain the subnet rather than manually specifying it
* if it only accepts key based authentication use the --ssh-cmd switch
  * sshuttle -r user\@ip --ssh-cmd "ssh -i KEYFILE" SUBNET
* if the compromised server is the same subnet use -x to exclude the server
  * `sshuttle -r user@172.16.0.5 172.16.0.0/24 -x 172.16.0.5`
*
