/** * opens another SSH connection via port-forwarded connection */ public SSHConnection OpenPortForwardedAnotherConnection(SSHConnectionParameter param, ISSHConnectionEventReceiver receiver, string host, int port) { ProtocolNegotiationHandler pnh = new ProtocolNegotiationHandler(param); ChannelSocket s = new ChannelSocket(pnh); SSHChannel ch = ForwardPort(s, host, port, "localhost", 0); s.SSHChennal = ch; return(SSHConnection.Connect(param, receiver, pnh, s)); }
/** * opens another SSH connection via port-forwarded connection */ public SSHConnection OpenPortForwardedAnotherConnection(SSHConnectionParameter param, ISSHConnectionEventReceiver receiver, string host, int port) { ProtocolNegotiationHandler pnh = new ProtocolNegotiationHandler(param); ChannelSocket s = new ChannelSocket(pnh); SSHChannel ch = ForwardPort(s, host, port, "localhost", 0); s.SSHChennal = ch; return SSHConnection.Connect(param, receiver, pnh, s); }