> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bytejmp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# sshuttle

> sshuttle VPN-like pivoting over SSH: transparent proxy, subnet routing, and multi-hop tunneling.

## Install

```bash theme={"dark"}
apt install sshuttle
pip install sshuttle
```

Requires Python on pivot host. No setup needed on pivot — uses SSH.

***

## Basic Usage

Route all traffic to subnet through pivot.

```bash theme={"dark"}
sshuttle -r user@PIVOT_IP 10.10.10.0/24
```

### With Key

```bash theme={"dark"}
sshuttle -r user@PIVOT_IP 10.10.10.0/24 --ssh-cmd "ssh -i /path/to/key"
```

### With Password (sshpass)

```bash theme={"dark"}
sshpass -p 'password' sshuttle -r user@PIVOT_IP 10.10.10.0/24
```

***

## Multiple Subnets

```bash theme={"dark"}
sshuttle -r user@PIVOT_IP 10.10.10.0/24 172.16.0.0/16
```

***

## Route All Traffic

```bash theme={"dark"}
sshuttle -r user@PIVOT_IP 0.0.0.0/0
```

***

## Exclude Subnets

```bash theme={"dark"}
sshuttle -r user@PIVOT_IP 10.10.10.0/24 -x 10.10.10.1/32
```

***

## DNS Forwarding

```bash theme={"dark"}
sshuttle --dns -r user@PIVOT_IP 10.10.10.0/24
```

***

## Non-Standard SSH Port

```bash theme={"dark"}
sshuttle -r user@PIVOT_IP:2222 10.10.10.0/24
```

***

## Verbose / Debug

```bash theme={"dark"}
sshuttle -vvr user@PIVOT_IP 10.10.10.0/24
```

***

## Advantages Over SSH SOCKS

* No ProxyChains needed — transparent routing
* Works with any tool (nmap TCP, curl, etc.)
* DNS forwarding support
* No SOCKS configuration per tool

## Limitations

* Requires Python on pivot
* TCP only (no UDP/ICMP)
* Needs root on attacker (iptables)

***

## Quick Reference

| Task         | Command                                                |
| ------------ | ------------------------------------------------------ |
| Route subnet | `sshuttle -r user@PIVOT 10.10.10.0/24`                 |
| All traffic  | `sshuttle -r user@PIVOT 0.0.0.0/0`                     |
| With DNS     | `sshuttle --dns -r user@PIVOT 10.10.10.0/24`           |
| With key     | `sshuttle -r user@PIVOT SUBNET --ssh-cmd "ssh -i key"` |
