简体   繁体   中英

sshuttle connection error : packet_write_wait: Connection to <server> port 22: Broken pipe (archlinux)

after last OS upgrade can't connect to server by sshuttle. it work normally for year but after upgrade get this error:

sshuttle --dns -r root@server  0.0.0.0/0 -vv
packet_write_wait: Connection to server port 22: Broken pipe
c : Waiting: 3 r=[5, 7, 9] w=[] x=[] (fullness=14/0)
c :   Ready: 3 r=[9] w=[] x=[]
firewall manager: undoing IPv4 changes.
>> iptables -t nat -D OUTPUT -j sshuttle-12300
>> iptables -t nat -D PREROUTING -j sshuttle-12300
>> iptables -t nat -F sshuttle-12300
>> iptables -t nat -X sshuttle-12300
firewall manager: undoing /etc/hosts changes.
c : fatal: server died with error code 255

I had already search on google but most of it is about ClientAliveInterval , ClientAliveCountMax , ServerAliveInterval .reinstall sshuttle and reset config not help. work on ubuntu 17.10 by same config.

A solution was posted on https://github.com/sshuttle/sshuttle/issues/150

Apparently one now needs to add -x <host> to the command (where <host> is server in your case). Worked for me.

I had a similar problem, though I did not have a fatal error. Sshuttle would immediately freeze after connecting, with no error message on the client or server. It turned out my phone's hotspot VPN settings were blocking sshuttle. Not the actual VPN, but the "killswitch" setting.

I never had a problem before, but my VPN app is always updating and adding new features.

Turning off "Automatic killswitch" aka "Block connections without VPN" solved the problem. Now all my other software is working much better.

Hope that helps someone.

(Either sshuttle was the solution to my other problems, or the killswitch was affecting other software functionality as well, perhaps the latter is the more likely explanation. Glad I tried to fix sshuttle first.)

Try this

sshuttle -vNr user@remote-ip  0.0.0.0/0 -x remote-ip/32

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM