linux – SSH连接错误:ssh_exchange_identification:读取:由peer重置连接

当我尝试通过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

相关文章

linux常用进程通信方式包括管道(pipe)、有名管道(FIFO)、...
Linux性能观测工具按类别可分为系统级别和进程级别,系统级别...
本文详细介绍了curl命令基础和高级用法,包括跳过https的证书...
本文包含作者工作中常用到的一些命令,用于诊断网络、磁盘占满...
linux的平均负载表示运行态和就绪态及不可中断状态(正在io)的...
CPU上下文频繁切换会导致系统性能下降,切换分为进程切换、线...