我需要在大型机上启动一个专有的 SSH 子系统。
我已将我的项目迁移到 dotnet core,但它不支持 ch.ethz.ssh2。我已将 lib 更改为 Renci.SSHNET,但没有在远程机器上启动子系统的命令。
在 ssh2 上
Session sess = conn.openSession();
int term_width = 0;
int term_height = 0;
sess.requestPTY("dumb", term_width, term_height, 0, 0, null);
sess.startSubSystem("xxx");
在 renci.sshnet 我使用 SshClient
ConnectionInfo connInfo = new ConnectionInfo(
HostIp,
Port,
HostUser,
new AuthenticationMethod[]{
new PasswordAuthenticationMethod(HostUser,HostPass.TrimEnd()),
});
msshclient = new SshClient(connInfo);
msshclient.Connect();