It looks like you are trying to connect to an SSH server through an intermediate SSH server (using it as a proxy).
This is supported by Rebex SSH, but it's done differently than in PuTTY, which has to launch an external utility to establish the tunnel.
Instead, just use SshSession
object to establish a connection to the SSH server you would like to use as a proxy:
var session = new SshSession();
session.Connect("proxy.shared.net");
session.Authenticate(proxyUsername, proxyPassword);
Then, use Ssh
class to connect to the target server, but instruct it to connect via the proxy:
var ssh = new Ssh();
ssh.SetSocketFactory(session.ToSocketFactory());
ssh.Connect("server.shared.net");
ssh.Login(serverUername, serverPassword);
Now, you have an instance of Ssh
that can be used as if it was connected directly.