Subject: Login failure with libssh2-1.2.2 and SuSE Enterprise 10 Linux

Login failure with libssh2-1.2.2 and SuSE Enterprise 10 Linux

From: Dave McCaldon <davem_at_intersystems.com>
Date: Mon, 14 Dec 2009 17:41:11 -0500

I'm trying to debug a connectivity problem when connecting to a Linux box (SuSE Enterprise 10, kernel 2.6.16.54) with libssh2.

This works ok with OpenSSH, running with -v -v -v reports the server/protocol version as:

Remote protocol version 1.99, remote software version OpenSSH_4.2

With libssh2, I'm getting a login failure (which is incorrectly reported as a failure to exchange encryption keys because of the libssh2_userauth_password() bug I've previously reported). Using the trace, I can see that the we're getting back packet type '51' in other words SSH_MSG_USERAUTH_FAILURE.

I've attached the trace log, but the interesting part is this:

[libssh2] 1.220928 Userauth: Attempting to login using password authentication
=> libssh2_transport_write plain (53 bytes)
0000: 32 00 00 00 05 64 61 76 65 6d 00 00 00 0e 73 73 2....davem....ss
0010: 68 2d 63 6f 6e 6e 65 63 74 69 6f 6e 00 00 00 08 h-connection....
0020: 70 61 73 73 77 6f 72 64 00 00 00 00 08 50 41 53 password.....PAS
0030: 53 57 4f 52 44 SWORD
=> libssh2_transport_write send() (84 bytes)
0000: 03 ee 0a db 97 e2 db 8d 93 3f a9 91 57 d8 6a 02 .........?..W.j.
0010: 18 20 c3 21 6f c8 7e 9c b0 cf 38 ab 47 46 a2 e1 . .!o.~...8.GF..
0020: 61 64 07 f3 9a 2f d1 91 8a 1c eb 11 54 5d df 86 ad.../......T]..
0030: 0c 56 d0 aa 22 3d e6 10 e2 18 93 46 f6 dc 64 09 .V.."=.....F..d.
0040: 05 cf 55 21 3a 01 88 ee 29 40 ec 53 7c 1d 15 06 ..U!:...)@.S|...
0050: bb 50 46 8c .PF.
[libssh2] 1.221385 Transport: Looking for packet of type: 52
[libssh2] 1.221388 Transport: Looking for packet of type: 51
[libssh2] 1.221391 Transport: Looking for packet of type: 60
[libssh2] 1.264376 Transport: Looking for packet of type: 52
[libssh2] 1.264405 Transport: Looking for packet of type: 51
[libssh2] 1.264410 Transport: Looking for packet of type: 60
=> libssh2_transport_read() raw (68 bytes)
0000: f3 86 b0 b7 6f 3f 2a 73 5e cd b6 5c bb 6b 8d cc ....o?*s^..\.k..
0010: 0d 0e b6 89 e6 e6 a9 f5 00 5c 9d 41 ff e6 c6 02 .........\.A....
0020: 64 4c 31 ec 9a 4a a4 35 b3 fd 70 c2 0a c0 d3 83 dL1..J.5..p.....
0030: 4a 3f 8f eb e3 d9 96 5a d8 59 ea 82 43 94 21 54 J?.....Z.Y..C.!T
0040: 58 f3 c1 6e X..n
=> libssh2_transport_read() plain (36 bytes)
0000: 33 00 00 00 1e 70 75 62 6c 69 63 6b 65 79 2c 6b 3....publickey,k
0010: 65 79 62 6f 61 72 64 2d 69 6e 74 65 72 61 63 74 eyboard-interact
0020: 69 76 65 00 ive.
[libssh2] 1.264919 Transport: Packet type 51 received, length=36
[libssh2] 1.264925 Transport: Looking for packet of type: 52
[libssh2] 1.264929 Transport: Looking for packet of type: 51
ERROR: Failed with -37, "Unable to exchange encryption keys" at Session.cpp:243,0

Note that the -37 error is a red herring (see my libssh2_userauth_password() patch), with my patch it correctly reports LIBSSH2_ERROR_AUTHORIZATION_FAILED.

Any thoughts on where to start debugging this?

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2009-12-14