Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What's the command for logging in with FTP all with one line?

ftp username:password@my.domain.com


Password required for username:password

share|improve this question

migrated from stackoverflow.com Mar 3 '12 at 21:09

This question came from our site for professional and enthusiast programmers.

Use man ftp to find out, or maybe ftp --help. Don't forget that ftp may mean different utilities.... –  Basile Starynkevitch Mar 3 '12 at 16:29
ftp ftp://username:password@my.domain.com –  Zheileman Mar 3 '12 at 16:35
You should also remember that the commandline of a given process is visible to all the other users on the system. Therefore, giving your password as a part of the commandline may be a serious security issue. –  Daniel Kozar Mar 3 '12 at 19:59

2 Answers 2

ftp ftp://username:password@my.domain.com

You could quite easily have used ftp --help though.

share|improve this answer
actually the command is "ftp -help", at least on Linux. Or "man ftp". –  0x4a6f4672 Jul 26 '12 at 8:30
The command shown produces: "Name or service not known". ftp -help produces nothing like with ftp:, // nor username:password@. –  C.W.Holeman II Dec 11 '14 at 16:54
What version of Linux are you using? I also get "Name or service not known" when I try the above syntax. I'm using CentOS 6. –  Tim Ludwinski Feb 6 at 17:34
I'm also getting Name or Service not known –  Kevin Johnson Jul 2 at 18:11

Try man netrc, better than giving password away in commandline.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.