cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: basic help please

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 2 Dec 2010 14:17:47 -0800

On Tue, Nov 30, 2010 at 05:07:56PM +0000, Lee Elcocks wrote:
> Have downloaded latest Curl for windows
>
> need to connect to Mydomain.com so that i can FTP files to and from.
>
> The server requires FTPS explicit (TLS AUTH)
>
> I have my private key and signed cert in Curl directory, they re in PEM format.
> I use the -K so that it accepts the servers certificate (I have to or i get
> numerous errors)
>
> the server that i need to connect to requires that i issue the
> following commands in the following sequence, in order to send a file, can
> somebody help me put together a command sequence?
>
> 1.AUTH TLS
> 2.PBSZ 0
> 3.PROT P
> 4.USER
> 5.PASS
> 6.ACCT
> 7.STRU F
> 8.TYPE I
> 9.MODE S
> 10.PASV
> 11.STOR
> 12.QUIT
>
> Many thanks for any help with this.

Something like this should get you started:

curl -T FILE_TO_SEND --ftp-ssl-reqd --ftp-account ACCOUNT_DATA \
  --cert CERTIFICATE_FILE --cert-type PEM --cacert CA_CERT \
  --quote 'STRU F' --quote 'MODE S' \
  ftp://mydomain.com/my/dir/

See how far you get with that then read the manual to see how you can
tweak things. See http://curl.haxx.se/docs/sslcerts.html for docs on
using certificates with curl.

>>> 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 2010-12-02