简体   繁体   中英

forwarding x11 by SSH.NET c# library

I am using the ssh.net as an extension in TestStand, but I need somehow display the x11 forwarding. Is it possible somehow? I am using xming server on my win. machine.

Thank you

I found the solution:

 SSHInstance = new SshClient(HostOrIP, Port, Username, Password);
 SSHInstance.Connect();
 streamSSH = SSHInstance.CreateShellStream(ShellID, 1, 0, 0, 0, 2000000);

 ForwardedPortRemote forwardedPortRemote = new ForwardedPortRemote(6000 +X11ServerDisplay, HostOrIP, 6000 + X11LocalDisplay);
 SSHInstance.AddForwardedPort(forwardedPortRemote);
 forwardedPortRemote.Start();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM