标题:[Linux] 解决secureCRT 登录 Rocky Linux 9.1 报错 No compatible hostkey. The server supports these methods: rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519 出处:刘新修 时间:Mon, 28 Nov 2022 15:18:16 +0000 作者:刘新修 地址:http://liuxinxiu.com:80/s/307/ 内容: C#代码 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-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512 No compatible hostkey. The server supports these methods: rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519 1、通过web管理终端登录系统 编辑/etc/ssh/sshd_config 在最下面新增 C#代码 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 2、重启sshd服务 systemctl restart sshd Generated by Bo-blog 2.1.1 Release