string host="10.26.158.117", user="test", the PWD="Test123 $";
Using (var client=new SshClient (host, the user, the PWD))
{
Client. The Connect ();//there is An error, error is An established connection was aborted by the software in the host machine.
Var output=client. RunCommand (echo "test");
Client. Disconnect ();
Console. WriteLine (output. The ToString ());
}
CodePudding user response:
When the code is not complete, SshClient connection didn't see the port, which port do you connect to 10.26.158.117? SSH default is 22,Can also use other SSH tool connection 10.26.158.117?
CodePudding user response: