Discussion:
cant connect, ssh hangs after SSH2_MSG_KEX_DH_GEX_GROUP
(too old to reply)
Micha
2007-02-28 18:05:12 UTC
Permalink
starting a while ago I can no longer ssh into my box anymore. I have tried anything I can think of and have no clue anymore. Needless to say that I realy need ssh to access my work from remote places.
When I ssh -vvv to my server the connection hangs after
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
UPDATE:

I have noticed that portforwarding is some sort of workaround. Since I
can conect from client to box but not the other direction I have set up
a port forwarding for the other direction.

***@client:~>$ ssh -R 10000:localhost:22 ***@server

Even though
***@server:~> ssh ***@client # doesnt work

doenst work, using the setup portforwarding it strangle works
***@server:~> ssh -p 10000 ***@localhost # works

I realy appriciate some experts knowledge since this is way to
strange/difficult for me.
I'm using Debian with openssh-server (1:4.3p2-8)
sshd: OpenSSH_4.3p2 Debian-8, OpenSSL 0.9.8c 05 Sep 2006
uname -a: Linux server 2.6.18-3-686 #1 SMP Mon Dec 4 16:41:14 UTC 2006 i686 GNU/Linux
I have recompiled a recent openssh from source on the client with now success. (I have no root access on the client and they use an older version of ssh)
I have booted grml (grml.org, a live linux cd) on my server and tried to connect to the sshd running from cd in order have a fresh sshd on my server.
I have purged and reinstalled openssh-server to get a fresh configuration.
I _can_ connect with putty on a windows client.
I hope you can help me, and thank you for your consideration.
=== Client Log ===
OpenSSH_3.8.1p1 Debian-8.sarge.6, OpenSSL 0.9.7e 25 Oct 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to server [x.x.x.x] port 22.
debug1: Connection established.
debug1: read PEM private key done: type DSA
debug1: read PEM private key done: type RSA
debug1: identity file /home/mw/.ssh/identity type -1
debug1: identity file /home/mw/.ssh/id_rsa type -1
debug1: identity file /home/mw/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3p2 Debian-8
debug1: match: OpenSSH_4.3p2 Debian-8 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.8.1p1 Debian-8.sarge.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_init: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
-- and it hangs here and stays forever
=== Server Log ===
server:~# /usr/sbin/sshd -D -d -d -d -e
debug2: load_server_config: filename /etc/ssh/sshd_config
debug2: load_server_config: done config len = 638
debug2: parse_server_config: config /etc/ssh/sshd_config len 638
debug1: sshd version OpenSSH_4.3p2 Debian-8
debug3: Not a RSA1 key file /etc/ssh/ssh_host_rsa_key.
debug1: read PEM private key done: type RSA
debug1: private host key: #0 type 1 RSA
debug3: Not a RSA1 key file /etc/ssh/ssh_host_dsa_key.
debug1: read PEM private key done: type DSA
debug1: private host key: #1 type 2 DSA
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-D'
debug1: rexec_argv[2]='-d'
debug1: rexec_argv[3]='-d'
debug1: rexec_argv[4]='-d'
debug1: rexec_argv[5]='-e'
debug2: fd 3 setting O_NONBLOCK
debug1: Bind to port 22 on ::.
Server listening on :: port 22.
debug2: fd 4 setting O_NONBLOCK
debug1: Bind to port 22 on 0.0.0.0.
debug3: fd 4 is not O_NONBLOCK
debug1: Server will not fork when running in debugging mode.
debug3: send_rexec_state: entering fd = 7 config len 638
debug3: ssh_msg_send: type 0
debug3: send_rexec_state: done
debug1: rexec start in 4 out 4 newsock 4 pipe -1 sock 7
debug3: recv_rexec_state: entering fd = 5
debug3: ssh_msg_recv entering
debug3: recv_rexec_state: done
debug2: parse_server_config: config rexec len 638
debug1: sshd version OpenSSH_4.3p2 Debian-8
debug3: Not a RSA1 key file /etc/ssh/ssh_host_rsa_key.
debug1: read PEM private key done: type RSA
debug1: private host key: #0 type 1 RSA
debug3: Not a RSA1 key file /etc/ssh/ssh_host_dsa_key.
debug1: read PEM private key done: type DSA
debug1: private host key: #1 type 2 DSA
debug1: inetd sockets after dupping: 3, 3
debug3: Normalising mapped IPv4 in IPv6 address
Connection from 139.18.9.23 port 4381
debug1: Client protocol version 2.0; client software version OpenSSH_3.8.1p1 Debian-8.sarge.6
debug1: match: OpenSSH_3.8.1p1 Debian-8.sarge.6 pat OpenSSH_3.*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.3p2 Debian-8
debug2: fd 3 setting O_NONBLOCK
debug3: privsep user:group 103:65534
debug1: permanently_set_uid: 103/65534
debug1: list_hostkey_types: ssh-rsa,ssh-dss
debug1: SSH2_MSG_KEXINIT sent
debug2: Network child is on pid 4713
debug3: preauth child monitor started
debug3: mm_request_receive entering
h***@mindspring.com
2007-02-28 21:21:38 UTC
Permalink
so what changed on your box and why
did you change it
since
you were able to ssh?




-----Original Message-----
Sent: Feb 28, 2007 4:48 AM
Subject: Re: cant connect, ssh hangs after SSH2_MSG_KEX_DH_GEX_GROUP
starting a while ago I can no longer ssh into my box anymore. I have tried anything I can think of and have no clue anymore. Needless to say that I realy need ssh to access my work from remote places.
When I ssh -vvv to my server the connection hangs after
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
I have noticed that portforwarding is some sort of workaround. Since I
can conect from client to box but not the other direction I have set up
a port forwarding for the other direction.
Even though
doenst work, using the setup portforwarding it strangle works
I realy appriciate some experts knowledge since this is way to
strange/difficult for me.
I'm using Debian with openssh-server (1:4.3p2-8)
sshd: OpenSSH_4.3p2 Debian-8, OpenSSL 0.9.8c 05 Sep 2006
uname -a: Linux server 2.6.18-3-686 #1 SMP Mon Dec 4 16:41:14 UTC 2006 i686 GNU/Linux
I have recompiled a recent openssh from source on the client with now success. (I have no root access on the client and they use an older version of ssh)
I have booted grml (grml.org, a live linux cd) on my server and tried to connect to the sshd running from cd in order have a fresh sshd on my server.
I have purged and reinstalled openssh-server to get a fresh configuration.
I _can_ connect with putty on a windows client.
I hope you can help me, and thank you for your consideration.
=== Client Log ===
OpenSSH_3.8.1p1 Debian-8.sarge.6, OpenSSL 0.9.7e 25 Oct 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to server [x.x.x.x] port 22.
debug1: Connection established.
debug1: read PEM private key done: type DSA
debug1: read PEM private key done: type RSA
debug1: identity file /home/mw/.ssh/identity type -1
debug1: identity file /home/mw/.ssh/id_rsa type -1
debug1: identity file /home/mw/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3p2 Debian-8
debug1: match: OpenSSH_4.3p2 Debian-8 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.8.1p1 Debian-8.sarge.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_init: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
-- and it hangs here and stays forever
=== Server Log ===
server:~# /usr/sbin/sshd -D -d -d -d -e
debug2: load_server_config: filename /etc/ssh/sshd_config
debug2: load_server_config: done config len = 638
debug2: parse_server_config: config /etc/ssh/sshd_config len 638
debug1: sshd version OpenSSH_4.3p2 Debian-8
debug3: Not a RSA1 key file /etc/ssh/ssh_host_rsa_key.
debug1: read PEM private key done: type RSA
debug1: private host key: #0 type 1 RSA
debug3: Not a RSA1 key file /etc/ssh/ssh_host_dsa_key.
debug1: read PEM private key done: type DSA
debug1: private host key: #1 type 2 DSA
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-D'
debug1: rexec_argv[2]='-d'
debug1: rexec_argv[3]='-d'
debug1: rexec_argv[4]='-d'
debug1: rexec_argv[5]='-e'
debug2: fd 3 setting O_NONBLOCK
debug1: Bind to port 22 on ::.
Server listening on :: port 22.
debug2: fd 4 setting O_NONBLOCK
debug1: Bind to port 22 on 0.0.0.0.
debug3: fd 4 is not O_NONBLOCK
debug1: Server will not fork when running in debugging mode.
debug3: send_rexec_state: entering fd = 7 config len 638
debug3: ssh_msg_send: type 0
debug3: send_rexec_state: done
debug1: rexec start in 4 out 4 newsock 4 pipe -1 sock 7
debug3: recv_rexec_state: entering fd = 5
debug3: ssh_msg_recv entering
debug3: recv_rexec_state: done
debug2: parse_server_config: config rexec len 638
debug1: sshd version OpenSSH_4.3p2 Debian-8
debug3: Not a RSA1 key file /etc/ssh/ssh_host_rsa_key.
debug1: read PEM private key done: type RSA
debug1: private host key: #0 type 1 RSA
debug3: Not a RSA1 key file /etc/ssh/ssh_host_dsa_key.
debug1: read PEM private key done: type DSA
debug1: private host key: #1 type 2 DSA
debug1: inetd sockets after dupping: 3, 3
debug3: Normalising mapped IPv4 in IPv6 address
Connection from 139.18.9.23 port 4381
debug1: Client protocol version 2.0; client software version OpenSSH_3.8.1p1 Debian-8.sarge.6
debug1: match: OpenSSH_3.8.1p1 Debian-8.sarge.6 pat OpenSSH_3.*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.3p2 Debian-8
debug2: fd 3 setting O_NONBLOCK
debug3: privsep user:group 103:65534
debug1: permanently_set_uid: 103/65534
debug1: list_hostkey_types: ssh-rsa,ssh-dss
debug1: SSH2_MSG_KEXINIT sent
debug2: Network child is on pid 4713
debug3: preauth child monitor started
debug3: mm_request_receive entering
Darren Tucker
2007-03-01 17:38:40 UTC
Permalink
Hi,
starting a while ago I can no longer ssh into my box anymore. I have
tried anything I can think of and have no clue anymore. Needless to
say that I realy need ssh to access my work from remote places.
Problem: When I ssh -vvv to my server the connection hangs after
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
[...]

Have you looked at this:

http://www.snailbook.com/faq/mtu-mismatch.auto.html

[quote]
Short Answer
You probably have an MTU/fragmentation problem. For each network
interface on both client and server set the MTU to 576, eg ifconfig eth0
mtu 576. If the problem goes away, read on.
[/quote]
--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
m***@gmx.de
2007-03-05 18:21:37 UTC
Permalink
Post by h***@mindspring.com
so what changed on your box and why
did you change it
since
you were able to ssh?
Unfortunately I cant say when it started. I also tried many setups that is why I dont think its the configuration of my box. I tried booting a live Linux, that should rule out wrong configs.

This is my current knowledge:

- Connecting (to the server) with putty.exe does work.

- Connecting to a friends server (using openssh) at the _same_ network doesnt work. That is it waits until connection times out at
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP

- Connecting from the server (using openssh) to the outside world does work.

- Changing MTU changes the point were connection aborts.
with MTU set to 1446 it aborts at
debug1: SSH2_MSG_KEXINIT sent

Wheras with MTU set to 1500 (on both sides), the client gets
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP

Thanks,
Micha
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
Loading...