Introduction
LFTP is a command-line utility for transporting files via the FTP protocol.
In addition to offering FTP capabilities, LFTP also offers a convenient method for generating debug output that can be useful for diagnosing problems with FTP connections.
Installation
If you're using MacOS you can install LFTP with the following resource:
https://formulae.brew.sh/formula/lftp
On CentOS you would run the following command:
yum install lftp
On Ubuntu you would use:
apt-get install lftp
Configuration
If you need to connect to a host that does not have a valid certificate you'll need to add the following configuration file:
~/.lftprc
And put the following within it:
set ssl:verify-certificate false
Connect
To connect use the following format, and then enter the password at the prompt:
lftp -u ftpusername host.add.ress.here
Then you would use the same FTP commands that you use with any other command-line ftp client.
Debug
You can enable debug output by setting the debug flag once you enter the login details, and then enter whatever FTP command you would like to debug after it.
➜ ~ lftp -u ftpusername host.address.here
Password:
lftp ftpusername@host.address.here:~> debug
lftp ftpusername@host.address.here:~>
Comments
0 comments
Article is closed for comments.