Home > Net >  Renci. SshNet SSH login host refuses to appear each other, what reason be excuse me?
Renci. SshNet SSH login host refuses to appear each other, what reason be excuse me?

Time:09-27

 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:

reference 1st floor datafansbj response:
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?

Don't have to write the default port is 22, in the open under the Windows 7 - SSH to log in, not in c #, and prompt each other host rejection,

CodePudding user response:


I was also used Renci. SshNet
When I'm connected SFTP, used,
You have a look at what is the difference between,
https://blog.csdn.net/hanjun0612/article/details/78246844
  •  Tags:  
  • C#
  • Related