SecureCRT:无法链接Linux服务器

发布网友 发布时间:2022-04-22 18:46

我来回答

1个回答

热心网友 时间:2023-11-15 21:34

一、问题:

使用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

二、解决办法:

1、需要修改两个地方:
(1) vim /etc/ssh/ssh_config

将下面两行注释去掉

(2) vim /etc/ssh/sshd_config

找到:PasswordAuthentication,设置成yes

PasswordAuthentication yes

最后一行增加:

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

2、重启sshd服务

(1)查看 sshd 服务是否启动: systemctl status sshd.service

(2)启动sshd服务: systemctl start sshd.service

(3)重启sshd服务: service sshd restart(或者 systemctl restart sshd.service )

三、SecureCRT Linux风格配置

1、Options->Session:

Terminal->Emulation: Terminal: Linux

Terminal->Appearance:Fonts->Character encoding: UTF-8

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com