From: BearItAll on
jdanskinner wrote:

> I'm using SuSE 8.1 as server.
>
> All was working properly this noon.
> Sometime this afternoon attempted logins from
> remote or loop back from console cause hang.
>
> I found nothing helpful in the logs but I did run
> sshd with -d -d -d startup.
>
> I got the following log
>
> 1752: debug1: sshd version OpenSSH_3.4p1
> 1752: debug3: Not a RSA1 key file /etc/ssh/ssh_host_rsa_key.
> 1752: debug1: read PEM private key done: type RSA
> 1752: debug1: private host key: #0 type 1 RSA
> 1752: debug3: Not a RSA1 key file /etc/ssh/ssh_host_dsa_key.
> 1752: debug1: read PEM private key done: type DSA
> 1752: debug1: private host key: #1 type 2 DSA
> 1752: Disabling protocol version 1. Could not load host key
> 1752: debug1: Bind to port 22 on ::.
> 1752: Server listening on :: port 22.
> 1752: debug1: Server will not fork when running in debugging mode.
> 1752: Connection from ::ffff:24.159.192.106 port 2484
> 1752: debug1: Client protocol version 2.0; client software version
> OpenSSH_3.4p1
> 1752: debug1: match: OpenSSH_3.4p1 pat OpenSSH*
> 1752: Enabling compatibility mode for protocol 2.0
> 1752: debug1: Local version string SSH-2.0-OpenSSH_3.4p1
> 1752: debug2: Network child is on pid 1753
> 1752: debug3: preauth child monitor started
> 1752: debug3: mm_request_receive entering
> 1753: debug3: privsep user:group 71:65
> 1753: debug1: list_hostkey_types: ssh-rsa,ssh-dss
> 1753: debug3: mm_request_send entering: type 20
> 1752: debug3: monitor_read: checking request 20
> 1753: debug3: mm_ssh_gssapi_server_ctx: waiting for
> MONITOR_ANS_GSSSETUP
> 1753: debug3: mm_request_receive_expect entering: type 21
> 1753: debug3: mm_request_receive entering
>
>
> I assume it must be a corrupt file someplace, but having no luck
> finding
> it.
>
> I can ssh from the server to another server and
> I can telnet to the server in questions.
>
> Any suggestions appreciated.
>
> Regards...Dan.

This is tricky, because each of the usual reasons for sshd failing I know of
doesn't cause a hang. The id_rsa or id_rsa.pub being missing or corrupt
gets an error that tells you the key isn't valid. known_hosts missing, you
get a messgae to accept the key or if the key is wrong you are told and
taken back to the command line.

So you get a message on all of those things that might cause the
communications to fail, except for one, if you select a host that doesn't
exist or exists but is unreacheable, then you get what seems like a hang.

Try
ssh 1.1.1.1

Is that what you mean by hang? Your ssh has sent the prompt but is sat
waiting for the response. My time out is currently at 3 minutes, because I
sometimes have trouble with Germany (don't we all). I can't remember what
the default timeout is. Althought you say you can telnet in, presumably can
loopback on the telnet too, I wonder if the problem is at the secure port
itself.

There is also another level to that, if you were to get part way through the
initial negotiation, you get another point where ssh seems to hang. The two
sides know each other are there, I think it is the time that the public
side of the secure comms is passed, but for some reason the response
doesn't come. I did have that with Germany just once though I am
semi-guessing that was the point where it stopped, I needed to restart sshd
in the end to get it going again, I didn't get a log event. But it only
happened the once, so I'm putting it down to global warming.

So really other than that I'm a bit stuck, can't help feeling that it has to
do with the secure port though, simply because unless it is an actual fauls
with your sshd code, then that is the only one I know that looks like a
hang.