I would like a simple (ideally one-liner, without separate script file) command to connect to an ftp server via anonymous login using my email address as the password.

My attempt is based on the syntax as shown here of basically ftp username:password@hostname; however this does not work for me when the password itself, being an email address, has an @ sign..

I also tried to provide a netrc file as a heredoc, as so: ftp hostname -N <<< 'login anonymous password user@email.com' but this still prompts me for a password during the ftp login..


use lftp


    lftp -u user,pass ftp.example.com

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.