4

我将 SharpSSH .NET 库用于 SFTP。
http://www.tamirgal.com/blog/page/sharpssh.aspx

当我尝试连接服务器时出现错误

算法协商失败

我的打印屏幕错误

但是当尝试通过 FileZilla 连接时,它可以正常工作。

我发现一些有相同的错误,但我不知道如何解决这个问题。

喜欢这里: http: //www.samhohce.net/questions/30190272/jsch-algorithm-negotiation-fail

4

3 回答 3

3

不要使用 SharpSSH。它自 2007 年以来就没有维护过!

这很可能是不安全的。并且不支持现代密码和 KEX 算法(因此出现错误)。

选择另一个 C# SFTP 库

于 2015-06-01T07:23:12.510 回答
1

Linux 已更新 openSSH,不再使用 diffie-hellman-group1-sha1 和 diffie-hellman-group-exchange-sha1,您应该添加

"密码 aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbc

MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha1-96,hmac-md5-96

Kex算法 diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh -sha2-nistp521,diffie-hellman-group1-sha1,curve25519-sha256@libssh.org " 在 linux /etc/ssh/sshd_config

于 2018-06-21T02:48:49.633 回答
0

如果有人必须支持这一点,我通过启用正确的加密来修复它。

检查 SFTP 服务器上的日志并启用它尝试使用的加密标准。

于 2017-12-15T14:17:05.083 回答