Connection to secure FTP Server from PHP

后端 未结 5 1048
醉梦人生
醉梦人生 2021-02-02 00:11

This question is in line with this question, I am trying to connect to secure FTP Server and it is not able to connect, wierd part is that I am able to do ssh and connect to the

5条回答
  •  闹比i
    闹比i (楼主)
    2021-02-02 01:03

    1. Many cheap webhoster will not give you ssh (hence no ftp via ssh aka sftp) but only ssl-secured ftp aka ftps (see here). You might have that problem. As others suggested, use filezilla or another ftp client to test your credits and chosen security method beforehand.

    2. ftp_ssl_connect() at least under windows will be a long journey, since you have to compile your own php binaries, see here.

    3. As this php contributor rightfully points out, no secure connection is secure, as long as you don't know, who you are talking too, aka „peer certification“ through valid certificates.

    4. phpseclib is probably your best bet. But I haven't figure out, how to ensure, it uses peer verification (guessing, the truth is in openssl.conf ...)

    5. So even at the time of writing, I wonder more than ever, if peer-validated ftps (ftp with ssl/tls authentification) is possible... also see my question here.

提交回复
热议问题