我使用j2ssh-core-0.2.9.jar对主机使用ssh。
在日志中我可以看到:
Client Algorithms: [diffie-hellman-group1-sha1]
Server Algorithms: [curve25519-sha256@libssh.org, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, diffie-hellman-group-
exchange-sha256, diffie-hellman-group-exchange-sha1, diffie-hellman-group14-sha1]我阅读了下列文件:
https://www.openssh.com/legacy.html
我去找了我想要去的主人,执行了如下命令:
ssh -Q 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我无法理解如何解决这个问题,因为即使在日志中我可以看到服务器的密钥交换方法不包含diffie-hellman-group1 1-sha1 1,但是当我在主机上执行ssh-Q kex命令时,输出显示diffie-hellman-group1 1-sha1 1是存在的。
请帮帮忙。
发布于 2018-04-19 11:28:15
您的SSH客户端(现在已有大约10年的历史)不支持更现代服务器的更强大、更安全的算法。
我建议您(作为您正在使用的API的作者)停止使用它,转而使用不同的API。还有更多最新的开源Java可供您使用,包括我自己的J2SSH Maverick,JSch,我相信会有一些评论为其他人提供这种情况。
https://stackoverflow.com/questions/49916558
复制相似问题