Easy API for portforwarding.

+1 vote
asked Nov 3, 2015 by ljruiten (210 points)

Hello,

I have seen multiple posts on this forum where a simple-to-use API for SSH tunneling is promised. My question is: is it created yet? We are thinking about starting to use the Rebex SSH Pack, and one of the things we would use if for is reverse port forwarding.

Kind regards,
lvruiten

1 Answer

0 votes
answered Nov 3, 2015 by Lukas Pokorny (114,150 points)
edited Jan 12, 2016 by Lukas Pokorny
 
Best answer

Update: 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!


Yes, it is created and will be released once we are done with thorough testing.

In the meantime, you can try the current beta build.

The Ssh object features a new StartOutgoingTunnel and StartIncomingTunnel methods that start an SSH tunnel from a local IP/port to a remote IP/port (or accepts connection from the other direction):

var ssh = new Ssh();
ssh.Connect(hostname);
ssh.Login(username, password);

// starts reverse port forwarding
var tunnel = ssh.StartIncomingTunnel("localhost", 1234, new IPEndPoint(IPAddress.Loopback, 1234));

// stops reverse port forwarding
tunnel.Close();
commented Nov 3, 2015 by ljruiten (210 points)
Oke, and what is the ETA on this release? I saw one of your posts from 2012 where you said that you would be starting with this in a couple of weeks....
commented Nov 3, 2015 by Lukas Pokorny (114,150 points)
Yes, this was one of the features we already planned to implement in 2010. Back then, I stated that "this is planned for one of the future releases". And it actually was. Unfortunately, SSH port forwarding was not a priority and got postponed several times when our near-term plans changed. Now, five years later, we already have a beta, but I won't repeat the same mistake again and I can only say that when we are done with the testing, it will be published with the following release.
commented Nov 11, 2015 by oki (250 points)
Lukas,
pls., can you bundle also a beta for customers with sourcecode access?
commented Nov 12, 2015 by Tomas Knopp (58,890 points)
edited Nov 12, 2015 by Tomas Knopp
Oki, yes we can :-)

I am preparing the full version package for you including source code and I will send it to you by today or tommorow at the latest.

UPDATE:
We sent it today.
commented Nov 12, 2015 by Tomas Knopp (58,890 points)
For other Rebex.NET customers - if you need the full version beta of the tunneling features, just send us an email to support@rebex.net and we will send the link back to you if your support contract is active.
...