The Debian 7 default lftp package (from the repository) refused to establish a secure TLS connection.
The lftp binary was not compiled with OpenSSL support in Debian 7 (likely due to licensing reasons). The tool ldd (list dynamic dependencies) is useful in this situation to confirm the shared libraries dependencies required by a specific binary.
Confirm a lack of OpenSSL support in lftp:
No results returned–expected. Let’s compile our own instead.
We’ll need a few things to pull this off:
1 2 3
Where is OpenSSL?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Next step is to issue a ‘make’:
Note, -jN determines the number of jobs to run simultaneously (can significantly speed up the make process), where “N” is an integer value. Usually you’ll want to align this value with the number of vCPUs you have available on the server in question.
Warning, do not pick an absurd integer value.
Install to the prefix you specified earlier, during configuration:
Warning, do not proceed with a make install, unless you specified a –prefix target during the ./configure step (above).
Check for OpenSSL support in the new custom lftp build (location was specified by the –prefix target):
OpenSSL has been successfully added.
Configure secure options in the lftp user profile (.lftp).
Note, the last step (EOF) will require keying [Enter] to push the configuration options to /home/user/.lftp/rc:
1 2 3 4 5 6 7 8 9 10
You should now be able to connect securely to the target FTP service, using the new binary: