Re: ssh_exchange_identification: Connection closed by remote host

From: Roman Kanala (Roman.Kanala@unige.ch)
Date: 08/16/02


Date: Fri, 16 Aug 2002 16:57:41 +0200
From: Roman Kanala <Roman.Kanala@unige.ch>


A few minutes ago, I wrote:

> I needed to swap two machines so I have first prepared the system,
> synchronised user data, changed their IPs and restarted. Everything
> works except SSH.
>
> I am using OpenSSH 3.4p1 with tcp-wrapper compiled in. There were
> several steps that had to be done and I saw in the archives that many
> people looked for help on this, so here are the details:
>
> Bind to port 22 on 0.0.0.0 failed: Address already in use.
> Cannot bind any address.
>
> This was the inetd already listening on port 22. sshd wanted to create
> keys and did not start properly from rc.tcpip, then it could not start
> anymore because port 22 was already bound to tcp_wrapper. It
> does not appear in ps, top, netstat so it's hard to find.
>
> Now, I have a different problem:
>
> ssh_exchange_identification: Connection closed by remote host
>
> I have probably re-create keys. I did it for system-level keys but
> there probably are more of them. When changing identities, they
> prevent negotiating the connection. Did someone already have this
> type of problem ?
>
> Roman Kanala, roman.kanala@unige.ch

It was in .ssh or .ssh2 within home directory on the client side. I have
wiped them out and got a usual inital question about re-creating code
keys. Also, it's good to check hosts.allow, the mine was OK. It works
now.

Roman Kanala