Notes about LFTP

From IdeaNet
Jump to navigationJump to search

How to connect to a ftp server forcing TLS usage

  • First check your LFTP version supports TLS:
$ lftp --version|grep ^Libraries
Libraries used: Readline 6.1, GnuTLS 2.8.5, zlib 1.2.3.3

Your LFTP version should have been compiled with GnuTLS to support TLS.

  • Connect to the FTP server by forcing TLS usage as follow:
$ lftp ftp://<ftphost>
lftp <ftphost>:~> set ftp:ssl-force true
lftp <ftphost>:~> login <username>
Password:
lftp <username>@<ftphost>:/> ls

bypass SSL certificate check

lftp <ftphost>:~> set ssl:verify-certificate no

SSL connection slowing down transfer speed / stalling the transfer

  • Disable usage of SSL:
$ lftp ftp://<ftphost>
lftp <ftphost>:~> set ftp:ssl-allow no