- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我尝试通过 ssh 连接 raspberry pi,但不幸的是我收到此错误消息。我尝试像本主题中那样使用 try-catch,Renci.SshNet : "server response does not contain ssh protocol identification"但它没有帮助。当我尝试在 linux 上通过 ssh.client 连接这个设备时,everythink 工作,所以 IP 和端口都很好。我在 Visual Studio 上工作,我使用 Xamarin.forms。
我的代码:
using (var client = new SshClient("11.15.16.385", 24, "root", "password"))
{
client.Connect();
client.RunCommand("reboot");
client.Disconnect();
}
结果:
Error in client.connect():
Renci.SshNet.Common.SshConnectionException: 'Server response does not
contain SSH protocol identification.'
最佳答案
这可能是由您的树莓派发送的响应引起的,您可以从 source code 中看到.它可能缺少版本信息。
关于c# - SshConnectionException : 'Server response does not contain SSH protocol identification.' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53851602/
从我的脚本尝试连接到 unix 服务器以下载文件但出现以下错误.. Renci.SshNet.Common.SshConnectionException : Client not connected.
我已经看到关于此错误的其他线程,但我随机遇到此错误。在 30 个连接中,有 12 个出现此错误。试图了解这是为什么,以及可能的解决方案是什么。 using (SftpClient client = n
我尝试通过 ssh 连接 raspberry pi,但不幸的是我收到此错误消息。我尝试像本主题中那样使用 try-catch,Renci.SshNet : "server response does
我是一名优秀的程序员,十分优秀!