Port Forwarding - Multiple Hops? - WeOnlyDo Discussion board

Port Forwarding - Multiple Hops? (wodSSHTunnel)

by Mike, Wednesday, October 08, 2014, 23:13 (3699 days ago)

I need to create a tunnel through multiple servers, something i haven't been able to accomplish with other SSH libraries.

I am trying to use Local Port Forwarding connecting my Desktop to a Windows server. Once connected, i am trying to continue the Port forwarding to an end device. This device is connected to a router ie. ANDA . It has a web interface I want to browse it on my Desktop.

Of course, i can do this with Putty successfully.

1. First connecting my desktop to the first server by creating a forwarded port

L9998 127.0.0.1:9997

2. Once SSH session is connecting on Windows server i run the SSH Command.

ssh -L - <[listenaddress:]listenport:remotehost:remoteport>
ssh -L 9997:192.168.1.10:443 admin@99.99.99.00

3. Once logged in to end device, i launch a browser on localhost and success!
https:127.0.0.1:9998


Trying to do this multi-hop with the port forwarding is unsuccessful. I create a standard local port forwarding to the Windows jump server with the SSH.NET library and then try and execute the SSL -L command. This gets me into the ssh connection to the end device, but i seem to lose the SSH tunnel or socket and get a channel error when i try and launch the browser on the bound port.

Is this multiple hop tunnel scenerio possible with this library?


Complete thread: