Remote Port Forwarding is not working with OpenSSH Server - WeOnlyDo Discussion board

Remote Port Forwarding is not working with OpenSSH Server (General questions)

by Kedar Babar, Tuesday, March 03, 2015, 14:49 (3399 days ago) @ Jasmine

Hi Jasmine,
I had taken the code which is available in the GitHub, following is the link

The channel add is as follows
private static void wodSSHTunnel1_Connected()
//If a new channel is defined as RemoteListen, then SSH server will bind RemoteAddress on RemotePort (Note: RemoteAddress
//as seen from the SSH server's end!!). When a new connection comes to the selected RemotePort, the SSH server will send
//a notification to wodSSHTunnel, which will initiate a new connection towards the LocalAddress interface on LocalPort.
//In this example we will forward port 5900. This is VNC server port. On remote server where your SSH server is you can
//open VNC connection using (localhost) and port 5900. You will be using encrypted connection instead insecure
//Internet connection. To accept connections from a foreign address, use the UserConnecting event (below) and set the
//SSH server option GatewayPorts to yes.
wodSSHTunnel1.Channels.Add(wodSSHTunnelCOMLib.ForwardTypesEnum.RemoteListen, "", 23, "", 8000);

Console.WriteLine("Remote listener added");

In the above code, I am telling SSH server to open the port 8000 and need to redirect to telnet port 23.

Thanks & Regards,
Kedar B.

Complete thread: