我正在尝试从一台服务器远程登录到另一台服务器,我已成功登录到第一台服务器,但是当我通过发送telnet命令尝试telnet时,它没有响应。
using (var client = new SshClient("00.000.0.00", 22, "user", "pass"))
{
try
{
client.Connect();
client.RunCommand("telnet 00.0.0.000 3300");
Thread.Sleep(30000);
client.RunCommand("LOGIN:user:pass");
Thread.Sleep(30000);
var cm = client.RunCommand("MY_COMMAND");
Label1.Text = cm.Result.ToString();
client.Disconnect();
}
catch (Exception ex)
{
Label1.Text = ex.Message;
}
}