Using sshuttle to access a server over multiple hops inbetween.

51 views
Skip to first unread message

Andreas Geesen

unread,
Jun 21, 2024, 9:46:21 AM6/21/24
to sshuttle
Hi all of you. I've been trying sshuttle to help accessing a small network of virtual servers. These servers are only accessible by traversing multiple other servers. 
For simple SSH we have a long string of ssh port forwardings to reach individual servers.

If i open one of these ssh forwards and then start shuttle on a separate shell i can use the forwarded port to establish a connection into the remote server network. So this is nice and helpful. 

But can i make the connection via all the other servers from within sshuttle command line alone?

Here's a sample (names / tips changed) ssh command to open a connection to one of our servers including the port-forwarding required for sshuttle to make a connection:

ssh -A -L 17222:localhost:17222 user@keymaster ssh -A -i ~/.pem/somekey.pem -L 17222:localhost:17222 someuser@gatewayserver ssh -A  -L 17222:TargetServer:22 vpn ssh -o StrictHostKeyChecking=no -A remoteadmin@TargetServer

With this connection established i can start sshuttle by running:

sshuttle -r remoteuser@localhost:17222 192.168.13.0/24

I've found the -e parameter to define which ssh and optional parameters but whichever combination i tried to create the ssh forward for shuttle to use this way failed.

Any ideas? I'm grateful for any response.

Best Regards.
Andreas
Reply all
Reply to author
Forward
0 new messages