Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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



Password required for username:password

share|improve this question

migrated from 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 – 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

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 '15 at 17:34
I'm also getting Name or Service not known – Kevin Johnson Jul 2 '15 at 18:11
doesn't work for me, fyi on a ubuntu remote server – user391339 May 28 at 21:26
ftp -nv

then user your_username or user anonymous

I posted this answer since ftp did not work for me.

Usage: { ftp | pftp } [-46pinegvtd] [hostname]
   -4: use IPv4 addresses only
   -6: use IPv6, nothing else
   -p: enable passive mode (default for pftp)
   -i: turn off prompting during mget
   -n: inhibit auto-login
   -e: disable readline support, if present
   -g: disable filename globbing
   -v: verbose mode
   -t: enable packet tracing [nonfunctional]
   -d: enable debugging
share|improve this answer

Use netrc. It is better than giving the password away on the command line.

share|improve this answer
This answer does not deserve a negative score (though it is lacking an example of how to do it). – Peter Mortensen May 28 at 11:28

You must log in to answer this question.