我正在使用 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 并执行的主机:
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-sha1 但是当我执行 ssh-Q kex 命令时主机,输出显示 diffie-hellman-group1-sha1 存在。
请帮忙。