hi,
I'm using: libcurl (7.21.3) + openssl(0.9.8k) + libssh2(1.2.8)  as SFTP client 
to try to download 1 byte from server .  Client side code is like this:


        CURL *curl = curl_easy_init();
        curl_easy_setopt(curl, CURLOPT_SSH_AUTH_TYPES, CURLSSH_AUTH_PASSWORD);
        curl_easy_setopt(curl, CURLOPT_USERPWD, m_userpwd.c_str());
        curl_easy_setopt(curl, CURLOPT_URL, myUrl.c_str());
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, hd_src);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, this->write_callback);
 curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, (curl_off_t)1);
         curl_easy_perform(curl);
 curl_easy_cleanup(curl);


To most SFTP server,  this works fine. But when we use this code to connect to 
the SFTP server that our customer provided.
We get this error in step curl_easy_perform(curl) :


But if we try to connect customer's SFTP server  by FileZilla  or other mature 
SFTP client,  no error occur.
This seems to be really serious issue, and I don't know what is wrong here. 
Please do help to figure it out. Thanks.

<<inline: 截图1.png>>

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to