curl-and-php
Re: Using curl for a sftp connection
Date: Thu, 17 May 2007 22:48:44 +0200 (CEST)
On Thu, 17 May 2007, Benedikt Allkemper wrote:
> I want to download a file from my server using ftp over ssl.
sftp is not ftps. ftp over ssl is what we call ftps. FTP-like tranfers over
SSH is what we call sftp.
> Changing the second line to $url =
> "ftps://username:pw_at_host:21/path/file"; does not establish an encrypted
> connection.
You should tell us:
- the exact error that happens, what libcurl says, what it returns etc
- libcurl version and operating system in use
- whether you really want implicit SSL as that's what you get with the
FTPS:// in the url, while the standard prefers the ftp:// approach with
CURLOPT_FTP_SSL set to the desired alternative.
> I've read and tried to understand the plenty of options and did a lot of
> trial and error, but wasn't able to get a sftp connection.
For sftp, you should use sftp:// with a libcurl that supports it.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.html _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-phpReceived on 2007-05-17