Hi,

I am using libssh2-1.2.7 in WINDOWS and try to connect to a server that is
using SSH-2.0-SSHD.
I am trying the same sftp.c to fetch a file from the server and am getting
an error - "Unable to send KEX init message"
Find attached the trace logs. Please help!!!!1

-Sriram
[libssh2] 0.461173 Conn: Setting blocking mode ON
[libssh2] 0.461173 Transport: session_startup for socket 916
[libssh2] 0.461173 Transport: Sending Banner: SSH-2.0-libssh2_1.2.7
[libssh2] 0.461173 Socket: Sent 23/23 bytes at 100339A0+0
[libssh2] 0.461173 Socket: Error recving 1 bytes to 0012F884: 11
[libssh2] 0.461173 Failure Event: -37 - Failed getting banner
[libssh2] 0.508048 Socket: Recved 1 bytes to 0012F884
[libssh2] 0.508048 Socket: Recved 1 bytes to 0012F884
[libssh2] 0.508048 Socket: Recved 1 bytes to 0012F884
[libssh2] 0.508048 Socket: Recved 1 bytes to 0012F884
[libssh2] 0.508048 Socket: Recved 1 bytes to 0012F884
[libssh2] 0.508048 Socket: Recved 1 bytes to 0012F884
[libssh2] 0.508048 Socket: Recved 1 bytes to 0012F884
[libssh2] 0.508048 Socket: Recved 1 bytes to 0012F884
[libssh2] 0.508048 Socket: Recved 1 bytes to 0012F884
[libssh2] 0.508048 Socket: Recved 1 bytes to 0012F884
[libssh2] 0.508048 Socket: Recved 1 bytes to 0012F884
[libssh2] 0.508048 Socket: Recved 1 bytes to 0012F884
[libssh2] 0.508048 Socket: Recved 1 bytes to 0012F884
[libssh2] 0.508048 Socket: Recved 1 bytes to 0012F884
[libssh2] 0.508048 Transport: Received Banner: SSH-2.0-SSHD
[libssh2] 0.648673 Key Ex: Sent KEX: 
diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
[libssh2] 0.648673 Key Ex: Sent HOSTKEY: ssh-rsa,ssh-dss
[libssh2] 0.648673 Key Ex: Sent CRYPT_CS: 
aes128-ctr,aes192-ctr,aes256-ctr,aes256-cbc,[email protected],aes192-cbc,aes128-cbc,blowfish-cbc,arcfour128,arcfour,cast128-cbc,3des-cbc
[libssh2] 0.648673 Key Ex: Sent CRYPT_SC: 
aes128-ctr,aes192-ctr,aes256-ctr,aes256-cbc,[email protected],aes192-cbc,aes128-cbc,blowfish-cbc,arcfour128,arcfour,cast128-cbc,3des-cbc
[libssh2] 0.648673 Key Ex: Sent MAC_CS: 
hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96,hmac-ripemd160,[email protected]
[libssh2] 0.648673 Key Ex: Sent MAC_SC: 
hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96,hmac-ripemd160,[email protected]
[libssh2] 0.648673 Key Ex: Sent COMP_CS: none
[libssh2] 0.648673 Key Ex: Sent COMP_SC: none
[libssh2] 0.648673 Key Ex: Sent LANG_CS:
[libssh2] 0.648673 Key Ex: Sent LANG_SC:
=> libssh2_transport_write plain (636 bytes)
0000: 14 A3 E3 89 FD B8 AD 62  69 F9 C3 73 DB 9F AC AE : .......bi..s....
0010: 4A 00 00 00 59 64 69 66  66 69 65 2D 68 65 6C 6C : J...Ydiffie-hell
0020: 6D 61 6E 2D 67 72 6F 75  70 31 34 2D 73 68 61 31 : man-group14-sha1
0030: 2C 64 69 66 66 69 65 2D  68 65 6C 6C 6D 61 6E 2D : ,diffie-hellman-
0040: 67 72 6F 75 70 2D 65 78  63 68 61 6E 67 65 2D 73 : group-exchange-s
0050: 68 61 31 2C 64 69 66 66  69 65 2D 68 65 6C 6C 6D : ha1,diffie-hellm
0060: 61 6E 2D 67 72 6F 75 70  31 2D 73 68 61 31 00 00 : an-group1-sha1..
0070: 00 0F 73 73 68 2D 72 73  61 2C 73 73 68 2D 64 73 : ..ssh-rsa,ssh-ds
0080: 73 00 00 00 92 61 65 73  31 32 38 2D 63 74 72 2C : s....aes128-ctr,
0090: 61 65 73 31 39 32 2D 63  74 72 2C 61 65 73 32 35 : aes192-ctr,aes25
00a0: 36 2D 63 74 72 2C 61 65  73 32 35 36 2D 63 62 63 : 6-ctr,aes256-cbc
00b0: 2C 72 69 6A 6E 64 61 65  6C 2D 63 62 63 40 6C 79 : ,rijndael-...@ly
00c0: 73 61 74 6F 72 2E 6C 69  75 2E 73 65 2C 61 65 73 : sator.liu.se,aes
00d0: 31 39 32 2D 63 62 63 2C  61 65 73 31 32 38 2D 63 : 192-cbc,aes128-c
00e0: 62 63 2C 62 6C 6F 77 66  69 73 68 2D 63 62 63 2C : bc,blowfish-cbc,
00f0: 61 72 63 66 6F 75 72 31  32 38 2C 61 72 63 66 6F : arcfour128,arcfo
0100: 75 72 2C 63 61 73 74 31  32 38 2D 63 62 63 2C 33 : ur,cast128-cbc,3
0110: 64 65 73 2D 63 62 63 00  00 00 92 61 65 73 31 32 : des-cbc....aes12
0120: 38 2D 63 74 72 2C 61 65  73 31 39 32 2D 63 74 72 : 8-ctr,aes192-ctr
0130: 2C 61 65 73 32 35 36 2D  63 74 72 2C 61 65 73 32 : ,aes256-ctr,aes2
0140: 35 36 2D 63 62 63 2C 72  69 6A 6E 64 61 65 6C 2D : 56-cbc,rijndael-
0150: 63 62 63 40 6C 79 73 61  74 6F 72 2E 6C 69 75 2E : [email protected].
0160: 73 65 2C 61 65 73 31 39  32 2D 63 62 63 2C 61 65 : se,aes192-cbc,ae
0170: 73 31 32 38 2D 63 62 63  2C 62 6C 6F 77 66 69 73 : s128-cbc,blowfis
0180: 68 2D 63 62 63 2C 61 72  63 66 6F 75 72 31 32 38 : h-cbc,arcfour128
0190: 2C 61 72 63 66 6F 75 72  2C 63 61 73 74 31 32 38 : ,arcfour,cast128
01a0: 2D 63 62 63 2C 33 64 65  73 2D 63 62 63 00 00 00 : -cbc,3des-cbc...
01b0: 55 68 6D 61 63 2D 73 68  61 31 2C 68 6D 61 63 2D : Uhmac-sha1,hmac-
01c0: 73 68 61 31 2D 39 36 2C  68 6D 61 63 2D 6D 64 35 : sha1-96,hmac-md5
01d0: 2C 68 6D 61 63 2D 6D 64  35 2D 39 36 2C 68 6D 61 : ,hmac-md5-96,hma
01e0: 63 2D 72 69 70 65 6D 64  31 36 30 2C 68 6D 61 63 : c-ripemd160,hmac
01f0: 2D 72 69 70 65 6D 64 31  36 30 40 6F 70 65 6E 73 : -ripemd...@opens
0200: 73 68 2E 63 6F 6D 00 00  00 55 68 6D 61 63 2D 73 : sh.com...Uhmac-s
0210: 68 61 31 2C 68 6D 61 63  2D 73 68 61 31 2D 39 36 : ha1,hmac-sha1-96
0220: 2C 68 6D 61 63 2D 6D 64  35 2C 68 6D 61 63 2D 6D : ,hmac-md5,hmac-m
0230: 64 35 2D 39 36 2C 68 6D  61 63 2D 72 69 70 65 6D : d5-96,hmac-ripem
0240: 64 31 36 30 2C 68 6D 61  63 2D 72 69 70 65 6D 64 : d160,hmac-ripemd
0250: 31 36 30 40 6F 70 65 6E  73 73 68 2E 63 6F 6D 00 : [email protected].
0260: 00 00 04 6E 6F 6E 65 00  00 00 04 6E 6F 6E 65 00 : ...none....none.
0270: 00 00 00 00 00 00 00 00  00 00 00 00             : ............
[libssh2] 0.679923 Socket: Sent 648/648 bytes at 00951AB0
=> libssh2_transport_write send() (648 bytes)
0000: 00 00 02 84 07 14 A3 E3  89 FD B8 AD 62 69 F9 C3 : ............bi..
0010: 73 DB 9F AC AE 4A 00 00  00 59 64 69 66 66 69 65 : s....J...Ydiffie
0020: 2D 68 65 6C 6C 6D 61 6E  2D 67 72 6F 75 70 31 34 : -hellman-group14
0030: 2D 73 68 61 31 2C 64 69  66 66 69 65 2D 68 65 6C : -sha1,diffie-hel
0040: 6C 6D 61 6E 2D 67 72 6F  75 70 2D 65 78 63 68 61 : lman-group-excha
0050: 6E 67 65 2D 73 68 61 31  2C 64 69 66 66 69 65 2D : nge-sha1,diffie-
0060: 68 65 6C 6C 6D 61 6E 2D  67 72 6F 75 70 31 2D 73 : hellman-group1-s
0070: 68 61 31 00 00 00 0F 73  73 68 2D 72 73 61 2C 73 : ha1....ssh-rsa,s
0080: 73 68 2D 64 73 73 00 00  00 92 61 65 73 31 32 38 : sh-dss....aes128
0090: 2D 63 74 72 2C 61 65 73  31 39 32 2D 63 74 72 2C : -ctr,aes192-ctr,
00a0: 61 65 73 32 35 36 2D 63  74 72 2C 61 65 73 32 35 : aes256-ctr,aes25
00b0: 36 2D 63 62 63 2C 72 69  6A 6E 64 61 65 6C 2D 63 : 6-cbc,rijndael-c
00c0: 62 63 40 6C 79 73 61 74  6F 72 2E 6C 69 75 2E 73 : [email protected]
00d0: 65 2C 61 65 73 31 39 32  2D 63 62 63 2C 61 65 73 : e,aes192-cbc,aes
00e0: 31 32 38 2D 63 62 63 2C  62 6C 6F 77 66 69 73 68 : 128-cbc,blowfish
00f0: 2D 63 62 63 2C 61 72 63  66 6F 75 72 31 32 38 2C : -cbc,arcfour128,
0100: 61 72 63 66 6F 75 72 2C  63 61 73 74 31 32 38 2D : arcfour,cast128-
0110: 63 62 63 2C 33 64 65 73  2D 63 62 63 00 00 00 92 : cbc,3des-cbc....
0120: 61 65 73 31 32 38 2D 63  74 72 2C 61 65 73 31 39 : aes128-ctr,aes19
0130: 32 2D 63 74 72 2C 61 65  73 32 35 36 2D 63 74 72 : 2-ctr,aes256-ctr
0140: 2C 61 65 73 32 35 36 2D  63 62 63 2C 72 69 6A 6E : ,aes256-cbc,rijn
0150: 64 61 65 6C 2D 63 62 63  40 6C 79 73 61 74 6F 72 : dael-...@lysator
0160: 2E 6C 69 75 2E 73 65 2C  61 65 73 31 39 32 2D 63 : .liu.se,aes192-c
0170: 62 63 2C 61 65 73 31 32  38 2D 63 62 63 2C 62 6C : bc,aes128-cbc,bl
0180: 6F 77 66 69 73 68 2D 63  62 63 2C 61 72 63 66 6F : owfish-cbc,arcfo
0190: 75 72 31 32 38 2C 61 72  63 66 6F 75 72 2C 63 61 : ur128,arcfour,ca
01a0: 73 74 31 32 38 2D 63 62  63 2C 33 64 65 73 2D 63 : st128-cbc,3des-c
01b0: 62 63 00 00 00 55 68 6D  61 63 2D 73 68 61 31 2C : bc...Uhmac-sha1,
01c0: 68 6D 61 63 2D 73 68 61  31 2D 39 36 2C 68 6D 61 : hmac-sha1-96,hma
01d0: 63 2D 6D 64 35 2C 68 6D  61 63 2D 6D 64 35 2D 39 : c-md5,hmac-md5-9
01e0: 36 2C 68 6D 61 63 2D 72  69 70 65 6D 64 31 36 30 : 6,hmac-ripemd160
01f0: 2C 68 6D 61 63 2D 72 69  70 65 6D 64 31 36 30 40 : ,hmac-ripemd160@
0200: 6F 70 65 6E 73 73 68 2E  63 6F 6D 00 00 00 55 68 : openssh.com...Uh
0210: 6D 61 63 2D 73 68 61 31  2C 68 6D 61 63 2D 73 68 : mac-sha1,hmac-sh
0220: 61 31 2D 39 36 2C 68 6D  61 63 2D 6D 64 35 2C 68 : a1-96,hmac-md5,h
0230: 6D 61 63 2D 6D 64 35 2D  39 36 2C 68 6D 61 63 2D : mac-md5-96,hmac-
0240: 72 69 70 65 6D 64 31 36  30 2C 68 6D 61 63 2D 72 : ripemd160,hmac-r
0250: 69 70 65 6D 64 31 36 30  40 6F 70 65 6E 73 73 68 : ipemd...@openssh
0260: 2E 63 6F 6D 00 00 00 04  6E 6F 6E 65 00 00 00 04 : .com....none....
0270: 6E 6F 6E 65 00 00 00 00  00 00 00 00 00 00 00 00 : none............
0280: 00 BE 5C AB 24 00 92 C3                          : ..\.$...
[libssh2] 0.711173 Transport: Looking for packet of type: 20
[libssh2] 0.711173 Socket: Recved 296/16384 bytes to 00945888+0
=> libssh2_transport_read() raw (296 bytes)
0000: 00 00 01 24 06 14 98 B8  4A 92 69 15 53 E9 67 F0 : ...$....J.i.S.g.
0010: 48 C4 2B D7 9A A4 00 00  00 36 64 69 66 66 69 65 : H.+......6diffie
0020: 2D 68 65 6C 6C 6D 61 6E  2D 67 72 6F 75 70 31 34 : -hellman-group14
0030: 2D 73 68 61 31 2C 64 69  66 66 69 65 2D 68 65 6C : -sha1,diffie-hel
0040: 6C 6D 61 6E 2D 67 72 6F  75 70 31 2D 73 68 61 31 : lman-group1-sha1
0050: 00 00 00 07 73 73 68 2D  72 73 61 00 00 00 36 62 : ....ssh-rsa...6b
0060: 6C 6F 77 66 69 73 68 2D  63 62 63 2C 61 65 73 31 : lowfish-cbc,aes1
0070: 32 38 2D 63 62 63 2C 33  64 65 73 2D 63 62 63 2C : 28-cbc,3des-cbc,
0080: 61 65 73 31 39 32 2D 63  62 63 2C 61 65 73 32 35 : aes192-cbc,aes25
0090: 36 2D 63 62 63 00 00 00  36 62 6C 6F 77 66 69 73 : 6-cbc...6blowfis
00a0: 68 2D 63 62 63 2C 61 65  73 31 32 38 2D 63 62 63 : h-cbc,aes128-cbc
00b0: 2C 33 64 65 73 2D 63 62  63 2C 61 65 73 31 39 32 : ,3des-cbc,aes192
00c0: 2D 63 62 63 2C 61 65 73  32 35 36 2D 63 62 63 00 : -cbc,aes256-cbc.
00d0: 00 00 12 68 6D 61 63 2D  73 68 61 31 2C 68 6D 61 : ...hmac-sha1,hma
00e0: 63 2D 6D 64 35 00 00 00  12 68 6D 61 63 2D 73 68 : c-md5....hmac-sh
00f0: 61 31 2C 68 6D 61 63 2D  6D 64 35 00 00 00 09 6E : a1,hmac-md5....n
0100: 6F 6E 65 2C 7A 6C 69 62  00 00 00 09 6E 6F 6E 65 : one,zlib....none
0110: 2C 7A 6C 69 62 00 00 00  00 00 00 00 00 00 00 00 : ,zlib...........
0120: 00 00 B9 A0 64 E9 D6 51                          : ....d..Q
=> libssh2_transport_read() plain (285 bytes)
0000: 14 98 B8 4A 92 69 15 53  E9 67 F0 48 C4 2B D7 9A : ...J.i.S.g.H.+..
0010: A4 00 00 00 36 64 69 66  66 69 65 2D 68 65 6C 6C : ....6diffie-hell
0020: 6D 61 6E 2D 67 72 6F 75  70 31 34 2D 73 68 61 31 : man-group14-sha1
0030: 2C 64 69 66 66 69 65 2D  68 65 6C 6C 6D 61 6E 2D : ,diffie-hellman-
0040: 67 72 6F 75 70 31 2D 73  68 61 31 00 00 00 07 73 : group1-sha1....s
0050: 73 68 2D 72 73 61 00 00  00 36 62 6C 6F 77 66 69 : sh-rsa...6blowfi
0060: 73 68 2D 63 62 63 2C 61  65 73 31 32 38 2D 63 62 : sh-cbc,aes128-cb
0070: 63 2C 33 64 65 73 2D 63  62 63 2C 61 65 73 31 39 : c,3des-cbc,aes19
0080: 32 2D 63 62 63 2C 61 65  73 32 35 36 2D 63 62 63 : 2-cbc,aes256-cbc
0090: 00 00 00 36 62 6C 6F 77  66 69 73 68 2D 63 62 63 : ...6blowfish-cbc
00a0: 2C 61 65 73 31 32 38 2D  63 62 63 2C 33 64 65 73 : ,aes128-cbc,3des
00b0: 2D 63 62 63 2C 61 65 73  31 39 32 2D 63 62 63 2C : -cbc,aes192-cbc,
00c0: 61 65 73 32 35 36 2D 63  62 63 00 00 00 12 68 6D : aes256-cbc....hm
00d0: 61 63 2D 73 68 61 31 2C  68 6D 61 63 2D 6D 64 35 : ac-sha1,hmac-md5
00e0: 00 00 00 12 68 6D 61 63  2D 73 68 61 31 2C 68 6D : ....hmac-sha1,hm
00f0: 61 63 2D 6D 64 35 00 00  00 09 6E 6F 6E 65 2C 7A : ac-md5....none,z
0100: 6C 69 62 00 00 00 09 6E  6F 6E 65 2C 7A 6C 69 62 : lib....none,zlib
0110: 00 00 00 00 00 00 00 00  00 00 00 00 00          : .............
[libssh2] 0.742423 Transport: Packet type 20 received, length=285
[libssh2] 0.758048 Transport: Looking for packet of type: 20
[libssh2] 0.758048 Key Ex: Agreed on KEX method: diffie-hellman-group14-sha1
[libssh2] 0.758048 Key Ex: Agreed on HOSTKEY method: ssh-rsa
[libssh2] 0.758048 Key Ex: Agreed on CRYPT_CS method: aes256-cbc
[libssh2] 0.758048 Key Ex: Agreed on CRYPT_SC method: aes256-cbc
[libssh2] 0.758048 Key Ex: Agreed on MAC_CS method: hmac-sha1
[libssh2] 0.758048 Key Ex: Agreed on MAC_SC method: hmac-sha1
[libssh2] 0.758048 Key Ex: Agreed on COMP_CS method: none
[libssh2] 0.758048 Key Ex: Agreed on COMP_SC method: none
[libssh2] 0.758048 Key Ex: Initiating Diffie-Hellman Group14 Key Exchange
[libssh2] 0.773673 Key Ex: Sending KEX packet 30
=> libssh2_transport_write plain (262 bytes)
0000: 1E 00 00 01 01 00 B6 FA  A4 E2 50 B7 7E 3A FA D8 : ..........P.~:..
0010: 39 CF D3 22 1D 38 33 2D  79 B9 27 06 A9 B8 F9 4C : 9..".83-y.'....L
0020: C3 9F C7 F1 2C 45 E5 53  7A 4C CC 91 DA 12 21 99 : ....,E.SzL....!.
0030: 51 12 4C 7C D9 2D FD 91  88 8F 94 5F 8B 0F A5 C5 : Q.L|.-....._....
0040: 06 C1 54 CD 22 21 39 81  31 12 73 3D 64 61 D0 B8 : ..T."!9.1.s=da..
0050: 78 3A DA 27 DF 20 C5 89  43 B7 BE D7 DB 27 F6 02 : x:.'. ..C....'..
0060: CF B2 78 5A 04 12 1F 38  EC 1D F9 2B ED 4A A8 C1 : ..xZ...8...+.J..
0070: A4 17 B2 D4 0F 6A D1 C5  98 D8 B7 23 A1 E8 3D 96 : .....j.....#..=.
0080: 43 D3 0D 83 BF 7F 2C 6F  9F 66 18 EB F8 01 89 A5 : C.....,o.f......
0090: 8D CD 21 38 76 20 2C D9  BB 62 51 10 3B 8B 13 C0 : ..!8v ,..bQ.;...
00a0: 1F 02 57 43 71 8F CC 44  59 29 86 3E 91 E6 A7 05 : ..WCq..DY).>....
00b0: 7D 8F 9C 7F 9C BF 01 EB  70 B9 EB 94 4B C4 34 1A : }.......p...K.4.
00c0: 8F 2A 81 28 DC 8C 0A 55  E7 E5 AE 7F 52 B6 FB FC : .*.(...U....R...
00d0: FB 19 72 29 5F FD 52 4C  62 83 33 E7 58 5B 53 56 : ..r)_.RLb.3.X[SV
00e0: 6E 37 F6 04 B0 7C 1C F8  B6 58 32 E6 18 D0 F3 B8 : n7...|...X2.....
00f0: AF 43 CE DB 7F E4 CD 4A  2F 99 31 1D 86 87 53 EB : .C.....J/.1...S.
0100: 55 37 B7 85 29 B9                                : U7..).
[libssh2] 0.789298 Socket: Error sending 272 bytes: 5
[libssh2] 0.789298 Failure Event: -1 - Unable to send KEX init message
[libssh2] 0.789298 Failure Event: -8 - Unrecoverable error exchanging keys
[libssh2] 0.789298 Failure Event: -8 - Unable to exchange encryption keys
Failure establishing SSH session: -8
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to