cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Getting files from SFTP is slower at newer versions

From: Moti Avrahami <moti.dp_at_gmail.com>
Date: Sun, 29 May 2016 11:05:06 +0300

The weird fact is that I tried it also with curl.exe and it works, but
doesn't work with libcurl.
I tried it against 2 servers and got the same result.
I verified the libcurl commands by the "curl.exe --libcurl" option and it's
seems Ok.

I've also sent a question to the libssh2 development group and published
the below debug output from libssh2, but still didn't get an answer there.

Any idea?

=> libssh2_transport_read() plain (692 bytes)

 [libssh2] 0.711551 Transport: Packet type 20 received, length=692

[libssh2] 0.711551 Transport: Looking for packet of type: 20

[libssh2] 0.711551 Key Ex: Agreed on KEX method:
diffie-hellman-group-exchange-sha1

[libssh2] 0.711551 Key Ex: Agreed on HOSTKEY method: ssh-rsa

[libssh2] 0.711551 Key Ex: Agreed on CRYPT_CS method: aes128-ctr

[libssh2] 0.711551 Key Ex: Agreed on CRYPT_SC method: aes128-ctr

[libssh2] 0.711551 Key Ex: Agreed on MAC_CS method: hmac-sha1

[libssh2] 0.711551 Key Ex: Agreed on MAC_SC method: hmac-sha1

[libssh2] 0.711551 Key Ex: Agreed on COMP_CS method: none

[libssh2] 0.711551 Key Ex: Agreed on COMP_SC method: none

[libssh2] 0.711551 Key Ex: Initiating Diffie-Hellman Group-Exchange (New
Method)

=> libssh2_transport_write plain (13 bytes)

0000: 22 00 00 04 00 00 00 06 00 00 00 08 00 : "............

[libssh2] 0.711551 Socket: Sent 40/40 bytes at 07A4BFAC

=> libssh2_transport_write send() (40 bytes)

0000: 00 00 00 24 16 22 00 00 04 00 00 00 06 00 00 00 : ...$."..........

0010: 08 00 8A B7 F1 C5 5C 79 A7 41 2C 15 10 41 14 7E : ......\y.A,..A.~

0020: 4E BC 6D 0D 19 D3 EA 5D : N.m....]

[libssh2] 0.711551 Transport: Looking for packet of type: 31

[libssh2] 0.727151 Socket: Recved 216/16384 bytes to 07A47F84+0

=> libssh2_transport_read() raw (216 bytes)

=> libssh2_transport_read() plain (203 bytes)

 [libssh2] 0.727151 Transport: Packet type 31 received, length=203

[libssh2] 0.727151 Transport: Looking for packet of type: 31

[libssh2] 0.727151 Key Ex: Sending KEX packet 32

=> libssh2_transport_write plain (198 bytes)

 [libssh2] 0.742751 Socket: Sent 208/208 bytes at 07A4BFAC

=> libssh2_transport_write send() (208 bytes)

 [libssh2] 0.742751 Transport: Looking for packet of type: 33

[libssh2] 0.742751 Socket: Recved 784/16384 bytes to 07A47F84+0

=> libssh2_transport_read() raw (784 bytes)

=> libssh2_transport_read() plain (753 bytes)

02f0: F3 : .

[libssh2] 0.742751 Transport: Packet type 33 received, length=753

[libssh2] 0.742751 Transport: Looking for packet of type: 33

[libssh2] 0.742751 Key Ex: Server's MD5 Fingerprint:
00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00

[libssh2] 0.758351 Key Ex: Server's SHA1 Fingerprint:
0b:b3:54:44:b7:ba:f0:dc:14

:f5:f6:25:91:72:80:1a:e9:cd:24:5c

[libssh2] 0.758351 Key Ex: Sending NEWKEYS message

=> libssh2_transport_write plain (1 bytes)

0000: 15 : .

[libssh2] 0.758351 Socket: Sent 184/184 bytes at 07A4BFAC

=> libssh2_transport_write send() (184 bytes)

 [libssh2] 0.758351 Transport: Looking for packet of type: 21

=> libssh2_transport_read() plain (1 bytes)

0000: 15 : .

[libssh2] 0.758351 Transport: Packet type 21 received, length=1

[libssh2] 0.758351 Transport: Looking for packet of type: 21

[libssh2] 0.758351 Key Ex: Received NEWKEYS message

[libssh2] 0.758351 Key Ex: session_id calculated

[libssh2] 0.758351 Failure Event: -8 - Unrecoverable error exchanging keys

[libssh2] 0.758351 Failure Event: -8 - Unable to exchange encryption keys

[libssh2] 0.758351 Transport: Freeing session resource

[libssh2] 0.758351 Transport: Extra packets left 0

On Sun, May 29, 2016 at 1:07 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Wed, 25 May 2016, Moti Avrahami wrote:
>
> please don't top-post.
>
> So I upgraded libssh2 to the newest version (1.7.0) but now I can't even
>> connect to a SFTP server and got this error:
>> "Failed initialization: Failure establishing ssh session"
>>
>
> That's unexpected.
>
> It means libssh2_session_startup() returned an error very early on which I
> can't see how it can be curl's fault. I'd suggest you first try the SFTP
> examples in libssh2 against that server to see that libssh2 actually works
> there. It feels like a bad libssh2 build or something.
>
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: https://cool.haxx.se/list/listinfo/curl-library
> Etiquette: https://curl.haxx.se/mail/etiquette.html
>

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-05-29