lftp behind a proxy

lftp1 If you use lftp as ftp client and you want to connect to an ftp site, but a (Squid) proxy that is blocking the access then you can solve it by adding these options in:

  • /etc/lftp.conf if you want the change to be global
  • ~/.lftp/rc if you want to make the change for the current user
# Sets the proxy server
set http:proxy http://user:password@proxy-server:port
# Set the user agent that will send to the proxy server very useful if your network administrators are paranoid and only supported known user agent
set http:user-agent 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv: Gecko/20100401 Firefox/3.6.3 (FM Scene 4.6.1)'

Further reading

– man lftp
– man lftp.conf

2 thoughts on “lftp behind a proxy”

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.