weird issues with DH Group1 key exchange

Greg Swallow gswallow at www.IN.gov
Wed Jan 25 08:05:02 EST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

We recently upgraded to OpenSSH 4.2p1 with the chroot patch supplied on
sourceforge.  Since then, we've noticed odd problems with random client
failures.  Today I wrote little scripts to keep restarting sshd with the
- -ddd flag and finally captured what's going on, I believe.

First, openssh is compiled as so:

OpenSSH_4.2p1, OpenSSL 0.9.8a

configured by ./configure, generated by GNU Autoconf 2.59,
  with options \"'--prefix=/usr/local' '--with-audit=bsm'
'--with-md5-passwords' '--with-kerberos5=/opt/krb5'
'--with-ssl-dir=/usr/local' '--with-zlib'\"

Then we have Net::SSH and Eclipse failing on us randomly (although with
alarming frequency).  Net::SSH version 1.23; Eclipse I have no idea.

What happens on the client side is:

bart: Reading configuration data /web/etc/noaccess/.ssh/config
bart: Reading configuration data /etc/ssh_config
bart: Connecting to eliza.ai.org, port 22.
bart: Remote protocol version 2.0, remote software version
OpenSSH_4.2-chrootsshbart: Net::SSH::Perl Version 1.23, protocol version
2.0.
bart: No compat match: OpenSSH_4.2-chrootssh.
bart: Connection established.
bart: Sent key-exchange init (KEXINIT), wait response.
bart: Algorithms, c->s: 3des-cbc hmac-sha1 none
bart: Algorithms, s->c: 3des-cbc hmac-sha1 none
bart: Entering Diffie-Hellman Group 1 key exchange.
bart: Sent DH public key, waiting for reply.
Connection closed by remote host. at
/usr1/local/lib/perl5/site_perl/5.6.1/Net/SSH/Perl/Kex/DH1.pm line 38

What happens on the server side is:

debug2: load_server_config: filename /usr/local/etc/sshd_config.private
debug2: load_server_config: done config len = 439
debug2: parse_server_config: config /usr/local/etc/sshd_config.private
len 439
debug1: sshd version OpenSSH_4.2-chrootsshp1
debug3: Not a RSA1 key file /usr/local/etc/ssh_host_key.
debug1: read PEM private key done: type RSA
debug1: private host key: #0 type 1 RSA
debug3: Not a RSA1 key file /usr/local/etc/ssh_host_rsa_key.
debug1: read PEM private key done: type RSA
debug1: private host key: #1 type 1 RSA
debug3: Not a RSA1 key file /usr/local/etc/ssh_host_dsa_key.
debug1: read PEM private key done: type DSA
debug1: private host key: #2 type 2 DSA
Disabling protocol version 1. Could not load host key
debug1: rexec_argv[0]='/usr/local/sbin/sshd'
debug1: rexec_argv[1]='-f'
debug1: rexec_argv[2]='/usr/local/etc/sshd_config.private'
debug1: rexec_argv[3]='-ddd'
debug2: fd 4 setting O_NONBLOCK
debug1: Bind to port 22 on 10.8.54.105.
Server listening on 10.8.54.105 port 22.
debug1: fd 5 clearing O_NONBLOCK
debug1: Server will not fork when running in debugging mode.
debug3: send_rexec_state: entering fd = 10 config len 439
debug3: ssh_msg_send: type 0
debug3: send_rexec_state: done
debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 10
debug1: inetd sockets after dupping: 4, 4
Connection from 10.8.6.80 port 57334
debug1: Client protocol version 2.0; client software version 1.23
debug1: no match: 1.23
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.2-chrootssh
debug2: fd 4 setting O_NONBLOCK
debug3: privsep user:group 22:22
debug1: permanently_set_uid: 22/22
debug1: list_hostkey_types: ssh-rsa,ssh-rsa,ssh-dss
debug1: SSH2_MSG_KEXINIT sent
debug2: Network child is on pid 20240
debug3: preauth child monitor started
debug3: mm_request_receive entering
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit:
diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-rsa,ssh-dss
debug2: kex_parse_kexinit:
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc at lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit:
aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc at lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit:
hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160 at openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit:
hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160 at openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib at openssh.com,zlib
debug2: kex_parse_kexinit: none,zlib at openssh.com,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-dss,ssh-rsa
debug2: kex_parse_kexinit: 3des-cbc,blowfish-cbc,arcfour
debug2: kex_parse_kexinit: 3des-cbc,blowfish-cbc,arcfour
debug2: kex_parse_kexinit: hmac-sha1,hmac-md5
debug2: kex_parse_kexinit: hmac-sha1,hmac-md5
debug2: kex_parse_kexinit: none
debug2: kex_parse_kexinit: none
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_init: found hmac-sha1
debug1: kex: client->server 3des-cbc hmac-sha1 none
debug2: mac_init: found hmac-sha1
debug1: kex: server->client 3des-cbc hmac-sha1 none
debug1: do_cleanup

Sometimes the server continues, but sometimes it just hangs up on me
here.  When it works, it continues:

debug2: dh_gen_key: priv key bits set: 178/384
debug2: bits set: 505/1024
debug1: expecting SSH2_MSG_KEXDH_INIT
debug2: bits set: 505/1024
debug3: mm_key_sign entering
debug3: mm_request_send entering: type 4
debug3: monitor_read: checking request 4
debug3: mm_answer_sign
debug3: mm_answer_sign: signature 103580(55)
debug3: mm_request_send entering: type 5
debug2: monitor_read: 4 used once, disabling now
debug3: mm_request_receive entering
debug3: mm_key_sign: waiting for MONITOR_ANS_SIGN
debug3: mm_request_receive_expect entering: type 5
debug3: mm_request_receive entering
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: KEX done
...

Help would be greatly appreciated.

- --
Greg Swallow
System Administrator, CCNA, CCSA
http://www.IN.gov
10 West Market St, Suite 600
Indianapolis, IN 46204
T. 317.233.2908
F. 317.233.2011
**********************************************************************
CONFIDENTIALITY NOTICE:
This E-mail and any attachments are confidential.  If you are not the
intended recipient, you do not have permission to disclose, copy,
distribute, or open any attachments.  If you have received this E-mail
in error, please notify us immediately by returning it to the sender
and delete this copy from your system.

Thank you.
accessIndiana, MyLocal.IN.gov, CivicNet
**********************************************************************
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFD1pZ9Ch6zYRu0Fx8RAku+AKC3nOmFgSspJw317Z1fTxSgGuONvgCfSGnj
x+/oP+Yd5VEZbF4uXaARsUY=
=s95I
-----END PGP SIGNATURE-----




More information about the openssh-unix-dev mailing list