ssh问题:ssh_exchange_identification: Connection closed by remote host

From: wiz.cn

Date: 2013-11-14

问题

在通过ssh进行免passwd认证,使用rsync同步文件时

时而会出现以下错误

​ ssh_exchange_identification: Connection closed by remote host

​ rsync: connection unexpectedly closed (0 bytes received so far) [receiver]

​ rsync error: unexplained error (code 255) at io.c(463) [receiver=2.6.8]

检查

通过抓包看连接情况:从机发起ssh连接请求时,马上就被主机给FIN掉了

解决

修改一个sshd配置:MaxStartups 参数(默认为10)

​ 同时允许几个尚未登录的联机画面(当我们连上ssh但尚未输入用户名密码时,这个时候就是联机画面)

​ 为了保护主机,这个被做了限制

目前有23台从机需要连接ssh进行rsync,而所有从机的rsync情况为时好时坏,对于每台都是这样

同步设备较多,而限制数较小,是引起问题的原因

编辑文件 /etc/ssh/sshd_config

将参数改为 MaxStartups 50 后,搞定

原文地址:https://www.cnblogs.com/tutuye/p/11589617.html