Read from remote host xx.xx.xx.xx: Connection reset by peer
Sometimes I also see the following error
ssh_exchange_identification: Connection closed by remote host.
Here is the ssh command executed in a loop.
ssh -q -o PasswordAuthentication=no -o "BatchMode=yes" -o
ServerAliveInterval=60 user@hostname "ls /var/log/"
I also have hosts.allow file which has SSHD: ALL in it. I do not have
a hosts.deny file and not many options enabled in ssh_config or
sshd_config.
Any ideas on why I am seeing these errors. Any suggestions/ideas/help
is much appreciated.
Thanks.
Yes, I did check the remote host's log there was nothing significant.
When the ssh_exchange_identification msg is seen. I see the following
in /var/log/auth.log
fatal: recv_rexec_state: ssh_msg_recv failed
I don't see any other messages logged for the Read from remote
host :Connection reset by peer logs.
Thanks.
Can you please check the network stability, what I suspect is that
your network gets congested during peak hours or there is massive
data transfer involved in-frequently causing communication being lost.
There is another suspected reason of the target or source host may
have gone out of processing resources as well
Try evaluating different things.
Network errors. Can't really do anything about it short of getting
better connection between the two (or, in severe case, remote host
is *very* overloaded to the point of dropping connections; or even
under attack, but that's completely different problem).
p.
--
Beware of he who would deny you access to information, for in his
heart he dreams himself your master. -- Commissioner Pravin Lal