0

I've been struggling with a challenge to use FTPS instead of FTP within an Applescript. The purpose is to create a directory on the server and upload files to a shared windows server with Hostgator.

The working in-the-clear FTP code is the following:

set ftpNewdir to ("curl " & "-u username:pwd ftp://server-ip/" &  "/ --ftp-create-dirs") as string do shell script ftpNewdir

I've been told that hostgator allows explicit FTPS with windows shared accounts.

After some research, Ive found that using the following code should work, but no luck.

curl --user name:passwd ftps://ftp.host.com/

I receive a "curl: (56) response reading failed" or timeout, etc...

Thanks in advance for any guidance.

  • Have you tried running the curl ftps command in terminal, just to make sure it works? There's no sense trying to debug the AppleScript unless we know that the underlying unix command functions correctly. – Ted Wrigley Sep 11 '20 at 23:54
  • Thank you. Yes, I have but receiving the same errors. The common "curl: (51) SSL: no alternative certificate subject name matches target host name...". – Nicholas Sep 12 '20 at 16:56
  • A quick search leads me to believe this may be a server-side problem. See [here](https://stackoverflow.com/questions/20842970/fix-curl-51-ssl-error-no-alternative-certificate-subject-name-matches) and [here](https://stackoverflow.com/questions/46481532/curl-error-no-alternative-certificate). Something to do with a misconfigured `hosts` file. – Ted Wrigley Sep 12 '20 at 17:10

0 Answers0