cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Versions of ftp and sftp supported by libcurl-7.20.1

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 5 Oct 2010 23:43:47 +0200 (CEST)

On Tue, 5 Oct 2010, Juan Carlos Franzoy wrote:

> Yesterday I was asked about which version (read which RFC) of FTP and SFTP
> are we using. I was browsing the documentation but I couldn't find it. Can
> anybody tell me which rfc concering FTP and SFTP are supported in
> libcurl-7.20.1?

A fair question indeed. I guess we should make this info into the docs
somewhere. I'll go for the lenghtier explanation here:

For FTP, the base spec is RFC959. But FTP has been extended many times since,
and we use parts of RFC1123 and the later various extensions if they seem to
work, I don't think it relies on anything other than plain RFC959. The FTP
implementation is natively done within libcurl. (I'm the primary author of it)

There's really no easy single spec to refer to, but rather a long range of
them (RFC1635, RFC2228, RFC2428, RFC2577 at least and RFC4217 if you want to
include FTP with TLS). There's talk going on in IETF to start a ftpext group
to work on such a unified spec but it's not taken off yet and it's not certain
that it ever will as FTP is considered a dead protocol by too many people.

For SFTP, the situation is different in several ways. First, the main
implementation curl use is provided by libssh2[1] - a independent third party
library (which I am the maintainer of as well these days). SFTP is built on
top of SSH. SSH is defined by RFC4250-RFC4254.

There was once work going on within IETF to standardize SFTP. During that work
the group released a series of internet-drafts for the protocol. The "base
spec" for SFTP is probably the version that is implemented by OpenSSH and a
bunch of other significant SFTP projects and that is SFTP version 3, found in
the draft-ietf-secsh-filexfer-02.txt spec[2] and libssh2 aims to implement
that version too. SSH in general (and thus SFTP too) allows for extensions
rather easily and some stuff has been extended by OpenSSH that libssh2 tries
to use, in case it works. (The initial implemenation of SFTP in libssh2 was
done by Sara Golemon.)

There's a splendid summary of SFTP protocol versions and the differences at:
http://www.greenend.org.uk/rjk/2007/sftpversions.html

[1] = http://www.libssh2.org/

[2] =
http://tools.ietf.org/wg/secsh/draft-ietf-secsh-filexfer/draft-ietf-secsh-filexfer-02.txt

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-10-05