> -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Michael Wood > Sent: Friday, October 09, 2009 4:58 PM > To: libcurl development > Subject: Re: libcurl and libssh2 > > 2009/10/9 Xu, Qiang (FXSGSC) <[email protected]>: > [...] > > Thanks a lot, Michael! > > :) > > > By the way, from > http://curl.netmirror.org/docs/manual.html, I got to > > know that --- > > > > 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? > > The curl command can generate sample code for any options you specify. > > Try this: > curl -u username sftp://shell.example.com/etc/issue --libcurl > ssh2-download-example.c curl -T uploadfile -u user:passwd > ftp://ftp.upload.com/myfile --libcurl ssh2-upload-example.c > > and then examine the ssh2-{download,upload}-example.c files > that are generated.
Hoho, that's a great tool. Thanks, Xu Qiang ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
