加入收藏 | 设为首页 | 会员中心 | 我要投稿 济源站长网 (https://www.0391zz.cn/)- 数据工具、数据仓库、行业智能、CDN、运营!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

linux – SSH连接错误:ssh_exchange_identification:读取:由p

发布时间:2020-12-24 18:51:27 所属栏目:Linux 来源:网络整理
导读:当我尝试通过SSH连接到服务器时,我收到以下错误, [root@oneeighty ~]# ssh -vvv -p 443 root@xxx.xxx.xxxOpenSSH_4.3p2,OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008debug1: Reading configuration data /etc/ssh/ssh_configdebug1: Applying options for *debug2

当我尝试通过SSH连接到服务器时,我收到以下错误,

[root@oneeighty ~]# ssh -vvv -p 443 root@xxx.xxx.xxx
OpenSSH_4.3p2,OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to xxx.xxx.xxx [IP] port 443.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: loaded 3 keys
ssh_exchange_identification: read: Connection reset by peer

我检查了服务器和客户端上的SSH配置,没有问题.

重新启动服务器上的SSH服务,然后重新启动服务器/客户端,但问题仍未解决.

解决方法

这可能是许多事情的结果.

您可以快速尝试的几件事情如下,

>在/etc/hosts.deny中查找sshd:ALL等条目
>也许,将sshd:ALL添加到/etc/hosts.allow
>您的SSHD的HostKeys可能已损坏.它们存在于/ etc / ssh /目录中.您可以删除它们并重新启动sshd,它将重新生成它们.如果出现错误,请使用以下命令

$ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
$ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
$ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key
$/etc/init.d/sshd start

(编辑:济源站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读