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();