It seems that lftp is incorrectly configured on many systems, which makes it impossible to verify server certificates (which leads to Fatal error: Certificate verification: Not trusted ).
The network (and the answers in this post) is full of suggestions on how to fix this by disabling certificate verification or encryption. This is unsafe because it allows man-in-the-middle attacks to go unnoticed.
The best solution is to properly configure certificate verification, which, fortunately, is simple. To do this, add the following line to /etc/lftp.conf (or, alternatively, ~/.lftp/rc or ~/.config/lftp/rc ):
set ssl:ca-file "/etc/ssl/certs/ca-certificates.crt"
ca-certificates.crt is a file that contains all the CA system certificates. The location used above is that of Ubuntu and may vary on different systems. To generate or update the file, run update-ca-certificates :
sudo update-ca-certificates
If your system does not have this command, you can create it manually as follows:
cat /etc/ssl/certs/*.pem | sudo tee /etc/ssl/certs/ca-certificates.crt > /dev/null
source share