FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 09-15-2012, 01:01 PM
Stephen Harris
 
Default ssh_exchange_identification: Connection closed by remote host

On Sat, Sep 15, 2012 at 07:01:03AM +0200, M. Fioretti wrote:
>
> On Fri, September 14, 2012 11:48 pm, Stephen Harris wrote:
>
> > 1) What happens if you run "telnet yourhost 22".
>
> this is what happens (with the proper IP of course):
>
> > Trying 1.2.3.4...
> > Connected to yourhost (1.2.3.4)
> > Escape character is '^]'.
> > Connection closed by foreign host.

This is important; it means the remote SSH server never says 'hello'.

> > 2) How quickly does the "closed" occur?
>
> I'd say 4/5 seconds

This is possibly indicative of resource starvation at the remote end;
the connection is going into the listen queue, then being accepted but
the process then fails. It might mean "out of memory" (for example)
so the server can't fork() the new sshd process. If you mean "4 or 5s"
then we might also be seeing swapping delays.

There _are_ other reasons for this type of behaviour (eg firewalls, network)
but that's the most common one that I've seen.

> ################################################## ###
> [marco@avalon ~]$ ssh -v -p xxx me@example.com

I assume the "xxx" here matches the port you tested with the telnet
test. Otherwise the telnet test is useless.

--

rgds
Stephen
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 09-15-2012, 01:46 PM
Tony Molloy
 
Default ssh_exchange_identification: Connection closed by remote host

On Saturday 15 September 2012 14:01:38 Stephen Harris wrote:
> On Sat, Sep 15, 2012 at 07:01:03AM +0200, M. Fioretti wrote:
> > On Fri, September 14, 2012 11:48 pm, Stephen Harris wrote:
> > > 1) What happens if you run "telnet yourhost 22".
> >
> > this is what happens (with the proper IP of course):
> > > Trying 1.2.3.4...
> > > Connected to yourhost (1.2.3.4)
> > > Escape character is '^]'.
> > > Connection closed by foreign host.
>
> This is important; it means the remote SSH server never says
> 'hello'.
>
> > > 2) How quickly does the "closed" occur?
> >
> > I'd say 4/5 seconds
>
> This is possibly indicative of resource starvation at the remote
> end; the connection is going into the listen queue, then being
> accepted but the process then fails. It might mean "out of
> memory" (for example) so the server can't fork() the new sshd
> process. If you mean "4 or 5s" then we might also be seeing
> swapping delays.
>
> There _are_ other reasons for this typ
> network) but that's the most common one that I've seen.
>
> >
################################################## ###
> > [marco@avalon ~]$ ssh -v -p xxx me@example.com
>
> I assume the "xxx" here matches the port yo[root@thomond ~]# ssh -l
root tmlinux.csis.ul.ie
> test. Otherwise the telnet test is useless.
>

As I said earlier in this thread that error can come from problems
with the hosts.allow file on the machine you are trying to connect to.

I've just reproduced the error on my own systems.

Log in to tmlinux from thomond, everything ok.

edit the /etc/hosts.allow file on tmlinux to disallow sshd access from
thomond.

Log out.

Login to tmlinux from thomond. Error.
.
[root@thomond ~]# ssh -l root tmlinux.csis.ul.ie
ssh_exchange_identification: Connection closed by remote host

Since you changed your ISP you changed your IP address. If you had
used the hosts.allow file to control access to ssh then that could be
your problem. Same holds for telnet and any other network connection.

Regards,

Tony



ssssssss
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 02:33 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org