C# 使用SSH.NET中的jumphost执行命令

C# 使用SSH.NET中的jumphost执行命令,c#,ssh.net,C#,Ssh.net,我正在使用SSH.NET库在(Red Hat)服务器上执行一个命令,如下所示: var response = string.Empty; using (var client = new SshClient("<host>", "<username>", "<password>")) { client.Connect(); var cmd = client.CreateCommand("<some command>"); respo

我正在使用SSH.NET库在(Red Hat)服务器上执行一个命令,如下所示:

var response = string.Empty;
using (var client = new SshClient("<host>", "<username>", "<password>"))
{
   client.Connect();
   var cmd = client.CreateCommand("<some command>");
   response = cmd.Execute();
   client.Disconnect();
}
ssh <user>@<server>
Pseudo-terminal will not be allocated because stdin is not a terminal.