Quantcast
Channel: Rebex Q&A Forum - Recent questions and answers
Viewing all articles
Browse latest Browse all 3862

Answered: Is it possible to do a Rebex.Net - SSH-connection with ProxyType Local and Telnet-command plink ?

$
0
0

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.


Viewing all articles
Browse latest Browse all 3862

Trending Articles