升级了SSH,CRT第二天登录不了

Key exchange failed.
No compatible key exchange method. The server supports these methods: sntrup761x25519-sha512@openssh.com,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
No compatible hostkey. The server supports these methods: rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519

前一天升级后CRT今天登录不了,到配置文件里面增加如下行加密支持,
如果之前的配置文件中已经有KexAlgorithms配置,请注释掉

HostKeyAlgorithms=+ssh-rsa,ssh-dss
KexAlgorithms=+diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1

修改后重启一下服务

Last login: Tue Aug 9 21:52:49 2022 from 192.168.220.1

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
如果你无法通过SSH登录到CentOS 7系统,可以按照以下步骤进行排查和解决: 1. 确保SSH服务已经安装并正在运行。使用以下命令检查SSH服务的状态: ``` systemctl status sshd ``` 如果服务没有运行,可以使用以下命令启动SSH服务: ``` systemctl start sshd ``` 2. 检查防火墙设置。如果系统上启用了防火墙,确保SSH服务的端口(默认为22)已经打开。可以使用以下命令检查防火墙状态: ``` systemctl status firewalld ``` 如果防火墙处于活动状态,可以使用以下命令打开SSH服务的端口: ``` firewall-cmd --zone=public --add-port=22/tcp --permanent firewall-cmd --reload ``` 3. 检查SSH配置文件。确认SSH配置文件(/etc/ssh/sshd_config)中的以下设置正确: - 确保“PasswordAuthentication”设置为“yes”,以允许使用密码进行身份验证。 - 确保“PermitRootLogin”设置为“yes”,以允许root用户登录。 - 确保“PubkeyAuthentication”设置为“yes”,以允许使用公钥身份验证。 4. 检查登录用户的权限。如果你使用的是非root用户进行SSH登录,确保该用户具有登录权限,并且密码或公钥身份验证设置正确。 5. 如果你仍然无法登录到系统,可以尝试重启SSH服务,并检查系统日志以获取更多详细信息: ``` systemctl restart sshd journalctl -xe ``` 如果问题仍然存在,建议参考CentOS官方文档或向相关技术支持寻求帮助。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值