You probably should work with a .netrc file:
A .netrc file in the user's local home
directory can provide the user-name, password, and optionally the
account; see netrc(4). Otherwise ftp prompts the user for this
information. The HP-UX FTP server does not require an account.
For security reasons, ftp always requires a password. It does
not log into remote accounts that do not have a password.
Example:
echo "machine TCPaddress login user_name password pass_word" > $HOME/.netrc
chmod 600 $HOME/.netrc
/usr/bin/ftp -i TCPaddress << EOI
<other commands like put, ls, etc ...>
quit
EOI
Maybe this will help ... runs on our HP-UX ...
Andreas Schmidt, CSC, Germany
"Porter, Allen" <[log in to unmask]>@RAVEN.UTC.EDU> on 16/11/2001
16:45:05
Please respond to "Porter, Allen" <[log in to unmask]>
Sent by: HP-3000 Systems Discussion <[log in to unmask]>
To: [log in to unmask]
cc:
Subject: [HP3000-L] FTP from UNIX hitting VSE
Here's something that is easy on MPE but we cannot figure out in UNIX...
We need to create a script on a UNIX box to log into a IBM VSE system and
ftp a file back. It works fine interactively but we cannot get it to work
in a script; it always hangs on the user name & password. Our sys admin
isn't even sure that it is opening the VSE connection. Has anyone had any
experience with this? What's the trick?
Here's the script we started with and have tried many variations of it.
open xx.xx.xx.xx
user uuuuu
pass pppppp
CD MYDIR
dir
close
And here's what we get
ftp <f
Password:Name (xx.xx.xx.xx:mmmm):
Syntax error in parameters or arguments.
Login failed.
Passive mode on.
?Invalid command
Syntax error, command unrecognized.
Passive mode refused. Turning off passive mode.
Syntax error, command unrecognized.
Syntax error, command unrecognized.
Thanks!
Allen Porter
Maritz Research, St. Louis
ISO 9001 Registered
Visit our web site @ <http://www.maritz>research.com
Confidentiality Warning: This e-mail contains information intended only
for the use of the individual or entity named above. If the reader of this
e-mail is not the intended recipient or the employee or agent responsible
for delivering it to the intended recipient, any dissemination, publication
or copying of this e-mail is strictly prohibited. The sender does not
accept any responsibility for any loss, disruption or damage to your data
or computer system that may occur while using data contained in, or
transmitted with, this e-mail. If you have received this e-mail in error,
please immediately notify us by return e-mail. Thank you.
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|