cURL / Mailing Lists / curl-library / Single Mail


Incomplete SFTP Transfers with curl 7.46.0 and libssh2 1.6.1

From: Edward LoPinto <>
Date: Tue, 15 Dec 2015 11:25:21 -0500

Dear cURL Hackers,

I've been putting together a package for curl 7.46.0 for my disto at, but I've run into a problem. All SFTP transfers larger than a few kilobytes fail with the error message: "curl: (18) transfer closed with x bytes remaining to read", where "x" is the number of bytes. SCP transfers work just fine.

Here are the details of my build:

curl 7.46.0 (x86_64-pc-win32) libcurl/7.46.0 OpenSSL/1.0.2e zlib/1.2.8 WinIDN libssh2/1.6.1_DEV
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL libz

I built curl and all the third party libraries with MS Visual Studio 2015. I downloaded the libssh2 source code from the GitHub repo, as the official release on did not include the CMake lists, and it's very hard to compile properly without them.

I've tried compiling and re-compiling in every possible combination of configurations, and I still receive the same error, so I suspect it's a problem with how curl 7.46.0 interacts with libssh2 1.6.1.

Here's a screenshot of the error:

Does anyone have any ideas about what might be going wrong?



List admin:
Received on 2015-12-15