LFTP is a nice file transfer program and despite the name, it also supports HTTP, FISH, SFTP, HTTPS, and FTPS besides FTP transfers. By default, when you try LFTP to connect to a remote server, this is what you might encounter:
[root@server backup]# lftp -u username,password myftp.servername lftp username@myftp.servername:~> ls `ls' at 0 [Making data connection...]
LFTP supports both FTP with or without SSL enabled. Apparently, it tries to connect by default using SSL, but my FTP server doesn’t support this. It will hang at ‘making data connection’ and that’s it. There are two ways how you can solve this. First of all, you can do it using the command line:
[root@server backup]# lftp -e "set ftp:ssl-allow off;" -u username,password myftp.servername
lftp username@myftp.servername:~> ls
drwxrwxrwx 1 1026 100 4096 Jan 25 19:06 Folder1
drwxrwxrwx 1 1024 100 12288 Jan 29 03:54 WPBackups
lftp username@myftp.servername:~>Just add “set ftp:ssl-allow off;” to make LFTP disable SSL. You can also disable it globally by editing the lftp.conf file:
[root@server backup]# vim /etc/lftp.confUse any text editor you like and add the following line to this file:
set ftp:ssl-allow false
Save and quit, and now you can run the LFTP command without any additional parameters:
[root@server backup]# lftp -u username,password myftp.servername
lftp username@myftp.servername:~> ls
drwxrwxrwx 1 1026 100 4096 Jan 25 19:06 Folder1
drwxrwxrwx 1 1024 100 12288 Jan 29 03:54 WPBackups
lftp username@myftp.servername:~>That’s all there is to it! Happy FTP’ing! If this lesson has helped you, please leave a comment or share it.
Rate This Article
Thanks for reading: How to Troubleshoot LFTP Stuck Making Data Connection, Sorry, my English is bad:)
