I need to create a bash script which will connect to an FTP server, upload a file and close the connection. Usually this would be an easy task but I need to specify some specific proxy settings which is making it difficult.
I can connect to the FTP fine using a GUI client i.e. Filezilla with the following settings:
Proxy Settings
--------------
FTP Proxy : USER@HOST
Proxy Host: proxy.domain.com
Proxy User: blank
Proxy Pass: blank

FTP Settings
------------
Host : 200.200.200.200
Port : 21
User : foo
Pass : bar

What I can’t seem to do is replicate these settings within a text based ftp client i.e. ftp, lftp etc. Can anyone help with setting this script up?
Thanks in advance!
According to the docs,
lftpshould support theftp_proxyenvironment variable, e.g.If that works, you can put
in your shell configuration files, or
in your ~/.lftprc.
Alternatively, try running the commands that your GUI FTP client is running, e.g.
upload.lftp
And run it using
-s:Or try
curl -T(docs)ncftpput(docs).Something like:
might work.