Server Fault is a question and answer site for system and network administrators. 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

I am struggling with how to set up a login script from a Linux client to an IIS server. I've tried here documents and a traditional echo script piped into the ftp (client) command, and my script is still prompted for username and password. I'd love to know what I'm doing wrong.

I have set up an IIS ftp site that responds to normal command line login.

ftp -i my-host

(fill in unam and pwd when prompted)

From Linux ftp client to Linux ftp server I can usually do something like

echo -e "user anonymous\\nbin\\nmget csm.exp.tar.gz" \
 | ftp -i -n my-server > /dev/null

but connecting to an IIS/ftp server, this still prompts for password, but not user.

share|improve this question
up vote 1 down vote accepted

If you want to use just FTP client from linux why don't you use it like

ftp -n -i $SERVER <<End-of-Session
    user username "password"

Not all of these commands are required (e.g. binary). Resolution with echoing username and password is a bit dirty.

share|improve this answer

Your Answer


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

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