sshuttle


Reading time: less than 1 minute

sshuttle is an application that lets you use an SSH connection as a VPN. Unlike the SOCKS proxy that comes with the OpenSSH client (the -D option), sshuttle doesn’t require you to change the proxy settings of every program you use. It forwards all packets using iptables, and handles those connection on the server by opening Python prompts and uploading its code there.

To use sshuttle, you don’t need to be admin on the server. The only dependency is having Python on both sides. It works out-of-the-box with an AWS EC2 instance with Amazon Linux, so you can easily script this to create VPNs.

When you forward all connections, don’t forget to exclude the IP of the server with the -x switch.

Example snippet

sshuttle --dns -v -r ec2-user@example.com 0/0 -x 54.87.121.135

Documentation

Citation

If you find this work useful, please cite it as:
@article{yaltirakli,
  title   = "sshuttle",
  author  = "Yaltirakli, Gokberk",
  journal = "gkbrk.com",
  year    = "2024",
  url     = "https://www.gkbrk.com/sshuttle"
}
Not using BibTeX? Click here for more citation styles.
IEEE Citation
Gokberk Yaltirakli, "sshuttle", November, 2024. [Online]. Available: https://www.gkbrk.com/sshuttle. [Accessed Nov. 12, 2024].
APA Style
Yaltirakli, G. (2024, November 12). sshuttle. https://www.gkbrk.com/sshuttle
Bluebook Style
Gokberk Yaltirakli, sshuttle, GKBRK.COM (Nov. 12, 2024), https://www.gkbrk.com/sshuttle

Comments

© 2024 Gokberk Yaltirakli