cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: libcurl and libssh2

From: Xu, Qiang (FXSGSC) <Qiang.Xu_at_fujixerox.com>
Date: Fri, 9 Oct 2009 16:28:04 +0800

> -----Original Message-----
> From: Kamil Dudka [mailto:kdudka_at_redhat.com]
> Sent: Friday, October 09, 2009 4:16 PM
> To: Xu, Qiang (FXSGSC)
> Cc: curl-library_at_cool.haxx.se
> Subject: Re: libcurl and libssh2
>
> On Friday 09 of October 2009 10:05:50 Xu, Qiang (FXSGSC) wrote:
> >
> > 1. Get a file from an SSH server using SFTP:
> >
> > curl -u username sftp://shell.example.com/etc/issue
> >
> > 2. Upload data from a specified file, login with user and password:
> >
> > curl -T uploadfile -u user:passwd ftp://ftp.upload.com/myfile
> >
> > This is command-line usage. Our printer is using the library, so I
> > want to know what option should be set with curl_easy_setopt(), in
> > case of file transfer via SFTP?
>
> http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTURL

So, can I say that if the url starts with "sftp://...", then an operation of
====================
curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_URL, "sftp://...");
====================
would guarantee the oncoming file transfer would be FTP over SSH2? That is to say, libcurl.so would call libssh2.so to transfer files on finding the url begins with "sftp://", right?

Thanks,
Xu Qiang
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-10-09