Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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"
    binary
    bell
    pwd
    bye
    End-of-Session

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

 
discard

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.