cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: sftp stable?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 7 Oct 2007 23:32:43 +0200 (CEST)

On Sun, 7 Oct 2007, Paul C wrote:

> I have benefited from cURL in prior projects many times... However, it
> appears sftp support is still experimental and buggy and its been a waste of
> my time to figure this out.

Welcome to the world of open source, curl is exactly as good as we've managed
to make it so far. You can of course help us improve it. You may think of that
as waste of time, but all contributors are "wasting" time on curl to the
benefit of themselves and others.

> The only success I have had is with the command line version on fedora6.

I don't get it. Isn't that success then? And what so special about the version
on fedora6?

> The error messages are also not helpful such as "curl: (78) Could not open
> remote file for reading: No such file or directory" when the same url "
> sftp://curluser:curlpassword@localhost/hello.txt" request works fine with a
> sftp client.

I trust this is on Linux then? Did you try with a more recent libssh2
(CVS/daily snapshot)? Did you try with one of the libssh2 example tools to see
if they can get the file(s) ?

> I have spent a couple days testing sftp support in v7.17.0 with various ssh2
> libs and dependencies and also modifying php 5.2.4 source to use new AUTH
> flags,and looking at server ssh logs but it appears the core issues are in
> the curl implementation.

libcurl relies on libssh2 for the SSH protocol stuff, and we've had a few bugs
in there in the past and there are likely to remain bugs. But as other
software, we need to get to know about them in order to start tracking them
down and fixing them.

> Has anyone had success?

Yes, many. In fact, we even have test cases in the test suite that do SFTP
transfers and those work fine on several different platforms on multiple
hosts.

> Can you provide a C example

It works just like with any other URL, but with an sftp:// prefix.

> and an ldd output for libcurl?

Why, what good would that tell?

That's a pretty hefty list on my debian system, with no less than 26 lines!

> If not, sftp should be removed from curl supported protocols until its more
> robust, better documented and good test cases and error messages are
> provided.

We support SFTP even if it bugs... And I didn't see you helping us out with
updated docs, test cases or error messages.

I really don't see what good it would bring if we'd stop mentioning it as
supported/available. I do however think that we should continue to improve it,
fix bugs and add more docs so that it'll work better and be easier to people
to learn how to use.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-10-07