Create a simple API for local and remote portforwarding

+8 votes
asked Apr 30, 2012 by Stefan Koell (270 points)
edited Sep 17, 2012

Hi Support,

it would be really helpful if you enrich your SSH to support an easy to use abstracted API for local and remote portforwarding.

Something like this:

var port = SshClient.AddLocalForwardedPort(string localIP, int localPort, string remoteHost, int remotePort);

port.ErrorReceived // a event handler to handle exceptions and gracefully stop the tunnel if some exception is thrown

port.Start(); // starts the local portforwarding
port.Stop();  // stops the local portforwarding

and for remote port forwarding:

var port = SshClient.AddRemoteForwardedPort(string remoteIP, int remotePort, string localHost, int localPort);

// same as above:
port.ErrorReceived
port.Start();
port.Stop();

This would be very helpful!

Regards, Stefan

commented May 1, 2012 by spskinner (110 points)
edited May 1, 2012

I see that Stefan has a valid point here, I am also interested in this post.

commented May 2, 2012 by Lukas Pokorny (114,150 points)
edited May 2, 2012

You are both right, this is one of the most-wanted features for our SSH components. I just raised the priority of this task, we should get started with it as soon as the next release is finished.

commented May 2, 2012 by Stefan Koell (270 points)
edited May 2, 2012

That's great to hear, Lukas! I'm really impressed with your components and your support quality. I'm looking forward to the new release and as always, if you want me to test your implementation, shoot me an email and I'm happily volunteering...

commented Jul 16, 2012 by radix (110 points)
edited Jul 18, 2012

I would further encourage investment in this function. This is a key feature that distinguishes the product and would bring real value. Please implement this!

commented Jul 18, 2012 by Lukas Pokorny (114,150 points)
edited Jul 18, 2012

This really seems to be one of the most requested features! :-) We will start working on it as soon as we are done with the current release (which will add 'await' support for .NET 4.5, another must-have feature).

commented Aug 14, 2012 by Patrick Nagle (110 points)
edited Aug 15, 2012

Hi. This is something I'm looking for also if you are need support to raise the priority.

commented Aug 15, 2012 by Lukas Pokorny (114,150 points)
edited Aug 15, 2012

Thanks! We are nearly done with the current release now and we can finally start working on this in a week or two.

commented Sep 11, 2012 by RaynDrahps (110 points)
edited Sep 11, 2012

This is a very important feature to have in an SSH client. Another vote from me.

commented Apr 17, 2015 by moski (210 points)

Is this already done?

1 Answer

+2 votes
answered Jan 12, 2016 by Lukas Pokorny (114,150 points)
 
Best answer

A simple API for local and remote SSH port forwarding (tunneling) has been added in Rebex Terminal Emulation 2016 R1. Check out some sample code, and sorry for the long wait!

...