Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ssh read from remote host xx.xx.xx.xx:Connection reset by peer

273 views
Skip to first unread message

Hari

unread,
Jul 28, 2009, 12:40:24 AM7/28/09
to harish.c...@gmail.com
All,
I have a script that does SSH from one machine to the other both of
which are running linux. The script does SSH in a loop and every few
hours or so I see the following errors one followed by the other.

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.

Bill Marcum

unread,
Jul 28, 2009, 2:37:08 AM7/28/09
to
On 2009-07-28, Hari <harish.c...@gmail.com> wrote:
> All,
> I have a script that does SSH from one machine to the other both of
> which are running linux. The script does SSH in a loop and every few
> hours or so I see the following errors one followed by the other.
>
> 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.
>
Sounds like a broken connection. Have you checked the remote host's logs?

Hari

unread,
Jul 28, 2009, 8:03:18 AM7/28/09
to
On Jul 28, 1:37 am, Bill Marcum <marcumb...@bellsouth.net> wrote:
> On 2009-07-28, Hari <harish.chandra...@gmail.com> wrote:> All,

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.

Moody

unread,
Jul 29, 2009, 10:08:16 AM7/29/09
to
On Jul 28, 6:03 pm, Hari <harish.chandra...@gmail.com> wrote:
> On Jul 28, 1:37 am, Bill Marcum <marcumb...@bellsouth.net> wrote:
>
> > On 2009-07-28, Hari <harish.chandra...@gmail.com> wrote:> All,
> > >   I have a script that does SSH from one machine to the other both of
> > > which are running linux. The script does SSH in a loop and every few
> > > hours or so I see the following errors one followed by the other.
>
> > > 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.
>
> > Sounds like a broken connection. Have you checked the remote host's logs?
>
> 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
>

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.

Piotr KUCHARSKI

unread,
Aug 1, 2009, 9:14:01 AM8/1/09
to
Hari <harish.c...@gmail.com> wrote:
> The script does SSH in a loop and every few
> hours or so I see the following errors one followed by the other.
> 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.
> Any ideas on why I am seeing these errors. Any suggestions/ideas/help
> is much appreciated.

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

0 new messages