#950·sshuttle

c : fatal: ssh connection to server exited with returncode 255

Author: DexSwaperCreated Apr 6, 2024Updated Jun 3, 2026

Hi , im running the follownig command:

bash
sudo sshuttle -vvvv -r [email protected] 0/0

on my ubuntu 23.10, and the server is ubuntu 22.04LTS, both have sshuttle installed using : sudo apt-get install sshuttle and pip install sshuttle

but the result is :

bash
sudo sshuttle -vvvv -r [email protected] 0/0
Starting sshuttle proxy (version 1.0.5).
c : which() found 'sudo' at /usr/bin/sudo
fw: Starting firewall with Python version 3.11.6
fw: Selecting a method automatically...
fw: which() found 'iptables' at /usr/sbin/iptables
fw: Method 'nat' was automatically selected.
fw: which() found 'iptables' at /usr/sbin/iptables
fw: ready method name nat.
c : IPv6 disabled since it isn't supported by method nat.
c : Method: nat
c : IPv4: on
c : IPv6: off (not available with nat method)
c : UDP : off (not available with nat method)
c : DNS : off (available)
c : User: off (available)
c : Subnets to forward through remote host (type, IP, cidr mask width, startPort, endPort):
c :   (<AddressFamily.AF_INET: 2>, '0.0.0.0', 0, 0, 0)
c : Subnets to exclude from forwarding:
c :   (<AddressFamily.AF_INET: 2>, '127.0.0.1', 32, 0, 0)
c : Trying to bind redirector on port 12300
c : TCP redirector listening on ('127.0.0.1', 12300).
c : TCP redirector listening with <socket.socket fd=5, family=2, type=1, proto=0, laddr=('127.0.0.1', 12300)>.
c : Starting client with Python version 3.11.6
c : Connecting to server...
c : which() found 'ssh' at /usr/bin/ssh
c : executing: ['/usr/bin/ssh', '[email protected]', '--', '/bin/sh -c \'P=python3; $P -V 2>/dev/null || P=python; exec "$P" -c \'"\'"\'import sys, os; verbosity=4; sys.stdin = os.fdopen(0, "rb"); exec(compile(sys.stdin.read(1486), "assembler.py", "exec"))\'"\'"\'\'']
c :  > channel=0 cmd=PING len=7 (fullness=0)
[email protected]'s password: 
 s: assembling 'sshuttle' (88 bytes)
 s: assembling 'sshuttle.cmdline_options' (65 bytes)
 s: assembling 'sshuttle.helpers' (2646 bytes)
 s: assembling 'sshuttle.ssnet' (5777 bytes)
 s: assembling 'sshuttle.hostwatch' (2436 bytes)
 s: assembling 'sshuttle.server' (3649 bytes)
 s: Starting server with Python version 3.10.12
 s: latency control setting = True
 s:  > channel=0 cmd=PING len=7 (fullness=0)
 s: auto-nets:False
c : Connected to server.
c : Waiting: 2 r=[5, 8] w=[8] x=[] (fullness=7/0)
c :   Ready: 2 r=[] w=[8] x=[]
c : mux wrote: 15/15
c : Waiting: 2 r=[5, 8] w=[] x=[] (fullness=7/0)
 s:  > channel=0 cmd=ROUTES len=0 (fullness=7)
 s: Waiting: 1 r=[0] w=[1] x=[] (fullness=7/0)
 s:   Ready: 1 r=[] w=[1] x=[]
 s: mux wrote: 15/15
 s: Waiting: 1 r=[0] w=[1] x=[] (fullness=7/0)
 s:   Ready: 1 r=[] w=[1] x=[]
 s: mux wrote: 8/8
 s: Waiting: 1 r=[0] w=[] x=[] (fullness=7/0)
c :   Ready: 2 r=[8] w=[] x=[]
c : <  channel=0 cmd=PING len=7
c :  > channel=0 cmd=PONG len=7 (fullness=7)
c : <  channel=0 cmd=ROUTES len=0
fw: Got subnets: [(2, 0, False, '0.0.0.0', 0, 0), (2, 32, True, '127.0.0.1', 0, 0)]
fw: Got nslist: []
fw: Got ports: 0,12300,0,0
fw: Got udp: False, user: None
fw: setting up.
fw: setting up IPv4.
fw: iptables -t nat -N sshuttle-12300
fw: iptables -t nat -F sshuttle-12300
fw: iptables -t nat -I OUTPUT 1 -j sshuttle-12300
fw: iptables -t nat -I PREROUTING 1 -j sshuttle-12300
fw: iptables -t nat -A sshuttle-12300 -j RETURN -m ttl --ttl 63
fw: iptables -t nat -A sshuttle-12300 -j RETURN -m addrtype --dst-type LOCAL
fw: iptables -t nat -A sshuttle-12300 -j RETURN --dest 127.0.0.1/32 -p tcp
fw: iptables -t nat -A sshuttle-12300 -j REDIRECT --dest 0.0.0.0/0 -p tcp --to-ports 12300
c : mux wrote: 15/15
c : Waiting: 2 r=[5, 8] w=[] x=[] (fullness=14/0)
client_loop: send disconnect: Broken pipe
c :   Ready: 2 r=[8] w=[] x=[]
fw: undoing changes.
fw: undoing IPv4 changes.
fw: iptables -t nat -D OUTPUT -j sshuttle-12300
fw: iptables -t nat -D PREROUTING -j sshuttle-12300
fw: iptables -t nat -F sshuttle-12300
fw: iptables -t nat -X sshuttle-12300

c : fatal: ssh connection to server (pid 3874) exited with returncode 255

any help ? regards