ssh tunnel to server after running sshuttle

178 views
Skip to first unread message

farshf...@gmail.com

unread,
Nov 25, 2019, 5:07:27 AM11/25/19
to sshuttle
Hi, so, I have serverA and serverB, I ssh tunnel to serverA and then run:
sshuttle --dns -r root@serverB 0/0 -x serverB
And all my traffic passes through serverB, just as I intend to.
Problem is, however, that after running sshuttle on serverA, it refuses to accept new ssh tunnel connection on port 22, previously connected sessions work fine but I want to be able to ssh tunnel to serverA while it runs shuttle to serverB

How do I do that? any help?

Brian May

unread,
Nov 25, 2019, 4:03:29 PM11/25/19
to sshuttle
Not sure I entirely understand your exact situation...

What do you mean by "refuses to accept new ssh tunnel connection on port
22" - does it come up with an error? timeout?
--
Brian May <br...@linuxpenguins.xyz>
https://linuxpenguins.xyz/brian/

farshf...@gmail.com

unread,
Nov 26, 2019, 4:19:58 AM11/26/19
to sshuttle
when I run
ssh serverA
the error says "Connection closed by remote host"

farshf...@gmail.com

unread,
Nov 26, 2019, 3:17:05 PM11/26/19
to sshuttle
To be more clear, first I ssh to serverA using termux on my phone, then I run 'sshuttle --dns -r root@serverB 0/0 -x serverB' in serverA terminal and it connects. After that I try to run a new ssh connection (I've tried termux and putty for this) and i get this error: "connection closed by remote host"

I have to route my traffic through seeverB (device <--> serverA <--> serverB) from multiple devices, and what I do right now is, I ssh tunnel from all the devices to serverA and then run sshuttle. If one of the connected devices get disconnected, I have to stop sshuttle, ssh tunnel from disconnected device and run sshuttle again. it works, but it's very frustrating...

Brian May

unread,
Nov 27, 2019, 4:01:42 PM11/27/19
to sshuttle
It does sound like sshuttle is intercepting the ssh packets, and finding
it cannot forward them on to the destination, and then rejects them.
This is not surprising as you have listed it should intercept packets
for all routes (0/0). I think you need to adjust the routes you have
configured for sshuttle (either the 0/0 or adding -x options) in order
not to intercept them.

farshf...@gmail.com

unread,
Nov 27, 2019, 7:00:12 PM11/27/19
to sshuttle
Thanks, but what can I use instead of 0/0 so that sshuttle won't inteecept traffic on port 22?

Brian May

unread,
Dec 1, 2019, 2:43:56 AM12/1/19
to farshf...@gmail.com, sshuttle
farshf...@gmail.com writes:

> Thanks, but what can I use instead of 0/0 so that sshuttle won't
> inteecept traffic on port 22?

Have you tried adding "-x serverA" to the command line, so it won't
intercept requests to itself?
Reply all
Reply to author
Forward
0 new messages