SecureCRT--解决Key exchange failed.No compatible key-exchange method

简介

        本文介绍SecureCrt连接Linux的报错问题:Key exchange failed.No compatible key-exchange method

问题复现

我在使用SecureCrt连接Linux时,报了如下错误:

Key exchange failed.
No compatible key-exchange method. The server supports these methods: curve25519-sha256,curve25519-sha256@libssh.org,
ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,
diffie-hellman-group18-sha512,diffie-hellman-group14-sha256

两种解决方法:
第一种: 升级SecureCRT为最新版,或者使用其他连接工具

第二种: 修改服务器,使其兼容老系统的算法
登录服务器后,在服务器里使用下面命令vi /etc/ssh/sshd_config

#加入下面的文本  
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1 #重启ssh systemctl restart sshd.service

树莓派相同情况

KexAlgorithms 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
————————————————
版权声明:本文为CSDN博主「风尘璞」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/baidu_35534327/article/details/80654356

版权声明:本文为CSDN博主「feverlook」的原创文章。
原文链接:https://blog.csdn.net/feverlook/article/details/116794725

posted @ 2023-02-08 09:43  brilliant_999  阅读(10149)  评论(0编辑  收藏  举报