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.
If you're using MacOS you can install LFTP with the following resource:
On CentOS you would run the following command:
yum install lftp
On Ubuntu you would use:
apt-get install lftp
If you need to connect to a host that does not have a valid certificate you'll need to add the following configuration file:
And put the following within it:
set ssl:verify-certificate false
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.
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
lftp email@example.com:~> debug