如何在 LFTP 中禁用 SSL 证书验证
问题:
你想使用 lftp 访问 FTPS 服务器,但你收到类似这样的错误消息:
lftp_error.txt
mirror: Fatal error: Certificate verification: certificate common name doesn't match requested host name ‘mydomain.de’ (C8:98:BC:01:1E:FF:08:CB:62:08:6B:F1:E8:4C:1F:13:0A:3B:D8:06)解决方案
你可以在 lftp 中使用以下命令禁用证书验证:
lftp_disable_ssl.txt
set ssl:verify-certificate false在 lftp 命令行中,你可以运行该命令然后重试导致错误消息的命令。由于 lftp 会记住你之前使用的命令,只需多次按向上箭头键直到你看到原始命令。
示例:
lftp_session.txt
lftp w012e7fe@nemeon.eu:~> mirror . MyBackup
mirror: Fatal error: Certificate verification: certificate common name doesn't match requested host name ‘mydomain.de’ (C8:98:BC:01:1E:FF:08:CB:62:08:6B:F1:E8:4C:1F:13:0A:3B:D8:06)
lftp w012e7fe@nemeon.eu:~> set ssl:verify-certificate false
lftp w012e7fe@nemeon.eu:~> mirror . MyBackup
[...]如果你的服务器实际上不支持 FTPS,你可能需要使用 set ftp:ssl-allow no 命令完全禁用 FTPS。
Check out similar posts by category:
Linux
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow