Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

ftp username:password@my.domain.com

says,

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.

2  
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
1  
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
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
6  
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

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

share|improve this answer

Your Answer

 
discard

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