cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl command for ssl won't connect

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 8 Jan 2014 23:19:04 +0100

On Wed, Jan 08, 2014 at 07:31:18PM +0000, Flores,Miguel,NORTH YORK,LGO Business Connections wrote:
> I use the command below:
>
> curl -3 -v --cacert /home/adm/ssl/certs/cert.pem --disable-epsv
> --ftp-skip-pasv-ip --ftp-ssl -T "/adm/FILE.TXT" ftp://User:Password@URL:990

You're specifying an explicit SSL FTP connection here, but giving the implicit
SSL FTP port (990). That won't work on a normally-configured server.

> However, when I instead do:
>
> curl --insecure ftps://localhost:21/hello.txt

And you're doing the opposite here: specifying an implicit SSL FTP transfer
(ftps:) but specifying the normal FTP port number (21). If you just drop the
port numbers in both the above commands, you may find that both of them work.

> i.e., use ftps as the URL scheme rather than ftp I get:
>
> curl: (35) Unknown SSL protocol error in connection to localhost:-9800

But the example you give already says ftps:

> Why doesn't an ftps URL work? (Explicitly using --ftp-ssl-reqd makes no
> difference.) Is it a ProFTPD server misconfiguration? An incorrect curl
> command-line?

Yes, most likely just an incorrect command-line. But there could be
configuration problems in the server as well. If you continue to have issues,
please use the -v option and post that output as well.

>>> Dan
-------------------------------------------------------------------
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 2014-01-08