cURL / Mailing Lists / curl-library / Single Mail

curl-library

cURL SFTP upload speed only 50% compared to command line SFTP

From: Ben Thomas <benmailinglists_at_gmail.com>
Date: Wed, 22 May 2013 13:06:23 +0100

I need to use cURL to upload some files to an SFTP server but it's
running a lot slower than standard SFTP from the command line.
Uploading using the standard SFTP client on Ubuntu 12.04, I'm getting
around 70Kb/s (this is fine, that's just the speed of the server), but
when using cURL, it's around 35Kb/s, half the speed of SFTP :/

Does anyone know of any ways I can speed up cURL, preferably without
having to upgrade to a new version as I really struggled to get my
version upgrading when I tried a while ago! But obviously I will if I
have to to get it working.

Here's the command I used for for SFTP:

/usr/bin/sftp -oProtocol=2 -oIdentityFile=/path/to/key.pri -oPort=5000
-oStrictHostKeyChecking=no username_at_thedomain.com

then just "put filename.wav" when it's connected...

and with cURL:

curl -v -u username: --key /path/to/key.pri --pubkey /path/to/key.pub
-T /path/to/filename.wav
sftp://thedomain.com:5000/folder/TEST/filename.wav --insecure

This is the cURL version info:

curl 7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1
zlib/1.2.3.4 libidn/1.23 libssh2/1.2.8 librtmp/2.3 Protocols: dict
file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtmp rtsp
scp sftp smtp smtps telnet tftp Features: GSS-Negotiate IDN IPv6
Largefile NTLM NTLM_WB SSL libz TLS-SRP

I assume it's not like this for everyone?
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-05-22