The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Problem with csh script rahulrathod Shell Programming and Scripting 4 02-21-2008 12:38 PM
script problem tdavenpo Shell Programming and Scripting 3 01-04-2006 04:07 PM
Problem starting a script from a 'main'-script Rakker UNIX for Dummies Questions & Answers 3 06-28-2005 09:12 AM
problem with a script Lestat Shell Programming and Scripting 4 06-13-2005 01:30 PM
problem with ftp script...please help vancouver_joe UNIX for Advanced & Expert Users 2 11-22-2001 07:47 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-18-2007
lawadm1 lawadm1 is offline
Registered User
  
 

Join Date: Jul 2002
Location: Chicago
Posts: 18
FTP script and problem

We have a script where we're trying to ftp to an outside ftp server, but it keeps failing with the error:
421 Service not available, remote server has closed connection

if we ftp <server> and manually enter the username and password from the Unix box it's just fine.

But when we try to use the ftp script to run:

ftp -n -i -v <<EOF
open <server>
user <username> <password>
ascii
ls
quit
EOF


We get the: 421 Service not available, remote server has closed connection

Any ideas?

Thanks, Jeff
  #2 (permalink)  
Old 06-18-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Try using "$HOME/.netrc" to set up the password rather than including it in the script.

Your ftp should really read a password from /dev/tty rather than stdin.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:38 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0