LFTP: certificate common name doesn't match requested host name

Solution 1:

As the comments said, ssl:check-hostname will work. It can be set in lftp shell by

set ssl:check-hostname no

Solution 2:

I was facing a similar problem in Amazon Linux 2 below helped me.

Append the file "/etc/lftp.conf" and try connecting again.

vi /etc/lftp.conf and append as below.

validate it as below.

cat /etc/lftp.conf | grep hostname
set ssl:check-hostname no