阿里云服务器SSH连接提示ssh_exchange_identification: read: Connection reset by peer,如何解决?SSH登录提示kex_exchange_identification应该是内核拒绝了ssh连接,云服务器吧分享解决方法:
ssh_exchange_identification: read: Connection reset by peer
阿里云服务器SSH远程连接提示“ssh_exchange_identification: read: Connection reset by peer”,如何解决?云服务器吧建议使用阿里云服务器ECS控制台自带的远程连接工具,如下图:

阿里云服务器远程连接
使用自带远程连接工具,一般可以解决问题。
也可以执行命令:ssh-keygen -R IP地址,清除known_hosts文件主机名密匙。
或执行命令:ssh -v root@IP地址,查看连接详细信息,如下图:

ssh -v root@IP地址
然后执行命令:vi /etc/hosts.allow,按字母i,进入vi编辑模式,添加sshd: ALL,允许所有IP地址链接主机。
如下图:

sshd: ALL
执行命令:systemctl restart sshd,重启sshd服务即可。
最后执行SSH连接命令:ssh root@IP地址,重新测试一下吧。
注意:2026云服务器价格优惠:阿里云和腾讯云最低38元一年,阿里云200M服务器,腾讯云4核服务器38元1年;京东云服务器CPU内存带宽带宽配置选择丰富,价格68元1年起;雨云游戏服务器配置高价格额优惠;详细移步到官方活动查看:
- 阿里云官方活动:https://t.aliyun.com/U/PtBQAB
- 腾讯云官方优惠:https://curl.qcloud.com/oRMoSucP
- 京东云服务器:https://jdyfwq.com/
- 雨云游戏服务器:https://rainyun.net/
- 百度云服务器:https://bdyfwq.com/
发表评论