cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Using curl for a sftp connection

From: Benedikt Allkemper <b.allkemper_at_web.de>
Date: Thu, 17 May 2007 23:45:42 +0200

Hello,

Thanks for your help!

> the exact error that happens, what libcurl says, what it returns etc
Can you explain, how I can get to this information. I use curl in my php
script and php doesn't output any notice, warning or error message.

> libcurl version and operating system in use
I use
- Windows XP
- PHP Version 5.2.1
- libcurl/7.16.0 OpenSSL/0.9.8d zlib/1.2.3

> whether you really want implicit SSL
It doesn't mather to me as long as the transfer is encrypted (both login
data and application data)

Using Wireshark to analyse the traffic, I've found the following:
Using ftp:// shows me a lot of packages using ftp protocol (download
successful)
Using ftps:// shows me only some tcp packages (no download)
It seems as there is no real attempt to connect to the ftp server using
ftps://.

Regards
Bene

Daniel Stenberg schrieb:
> 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.
>
>
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-05-17