cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: scp transfers not working

From: Eric <crc1021_at_myrealbox.com>
Date: Fri, 09 May 2008 14:39:31 -0500

>Have you tried using one of the libssh2 example source codes and checked if
>that can upload properly? It would help knowing if the problem is in libssh2
>or in libcurl...

Yes, I ran most of the samples of libssh2, and documented the times for reference. The scp problem appears to be specific to libcurl (it does not work for me code or curl)

52 Meg file over 100 MegBit LAN
upload to ssh server
cygwin openssh sftp 18 secs
cygwin openssh scp 15 secs
msys openssh sftp 32 secs
libssh2 scp_write (1k buf) 8 secs
libssh2 scp_write_nonblock (1k buf) 8 secs
libssh2 sftp_write (128k buf) 86 secs
libssh2 sftp_write (16k buf) 167 secs
libssh2 sftp_write_nonblock (16k buf) 168 secs
curl sftp upload 167 secs
curl scp upload does not work

download from ssh server
cygwin openssh scp 6.5 secs
cygwin openssh sftp 7.5 secs
msys openssh sftp 43 secs
libssh2 scp (1k buf) 9 secs
libssh2 sftp_nonblock (16k buf) 25 secs
libssh2 sftp (16k buf) 32 secs
libssh2 sftp (32k buf) 76 secs
curl sftp download 30 secs
curl scp download 6.5 secs

>SFTP is not a clever protocol (in general), and libssh2 has flaws in its
>implementation of it. Then, you top it off, libcurl has some problems to use
>it properly. See a recent entry added to KNOWN_BUGS.

Ok, item 53 in known bugs is what I was seeing with sftp uploads.
Given the big discrepancy between scp and sftp in general, I'd like to use scp as much as possible and only use sftp only to do stuff like rename files.

Eric
Received on 2008-05-09