Friday, May 27, 2011

lftp --> Fatal error: Certificate verification: Not trusted

$ lftp user@test.ftp.com:/directory
Password:
cd: Fatal error: Certificate verification: Not trusted
To disable certificate verification in lftp,

$ cat ~/.lftp/rc
set ssl:verify-certificate no

30 comments:

  1. This tip saved my day, thank you!

    ReplyDelete
  2. Thanks a lot. This helped me, but I got the next error as "Access failed : 521 Data connection cannot be opened with this PROT setting." Please help !

    ReplyDelete
  3. My life saver for my backup mirroring script with lftp. I just had to rebuild my server and it too me a while to find this again! Excellent.

    ReplyDelete
  4. If the file doesn't exist,
    just create a file with the filename 'rc'
    and with only 1 line in it
    'set ssl:verify-certificate no'
    in the config-directory.

    ReplyDelete
  5. solved the problem, many thanks

    ReplyDelete
  6. shew! saved my bacon. thanks!

    ReplyDelete
  7. thanks work for me (ubuntu)

    nano /etc/lftp.conf
    add this line :
    set ssl:verify-certificate no

    ReplyDelete
  8. Why if this is such a simple fix is it not the default setup? Strange, but thanks for the fix.

    ReplyDelete
  9. Because default setting is assuming that the certificates will be signed by public certificate authority. Real solution are authorities as https://letsencrypt.org/

    ReplyDelete
  10. I'm a vegetarian. Saved my lettuce! Thank you!

    ReplyDelete
  11. after doing as suggested, I am still getting the same error in centos 7

    ReplyDelete
  12. Sorry for the noobiness. Where do I find the lftp folder? Typing the command just says no such file or directory.

    ReplyDelete