Try sending the Password on a separate line with the PASS command
user $USER
pass $PASS



Larry Davis,
VM Capability


-----Original Message-----
From: Linux on 390 Port [mailto:LINUX-390@VM.MARIST.EDU] On Behalf Of Bauer, 
Bobby (NIH/CIT) [E]
Sent: Friday, August 30, 2013 12:30 PM
To: LINUX-390@VM.MARIST.EDU
Subject: Bash script for FTP to mainframe

Need to write a bash script (RHEL6) to FTP a file to the MVS side of the 
mainframe. Love to use SCP but to my knowledge, it only sends to the OMVS side. 
Here is the code with the names changed:

HOST=nih
USER=me
PASS=password
ftp -inv $HOST << EOF
user $USER $PASS
put  something     
bye
EOF

and here is the error message. 
Connected to nih (xxx.xxx.xxx.xxx).
220-FTPD1 IBM FTP CS V1R13 at nih, 12:03:54 on 2013-08-30.
220 Connection will close if idle for more than 1440 minutes.
Remote system type is MVS.
(username) 331 Send password please.
530 new passwords are not the same
Login failed.

I know the password is correct. I don't know what it is doing/complaining about 
when it says the new password is not the same. Anybody know how to do this?

Thanks
Bobby Bauer
Center for Information Technology
National Institutes of Health
Bethesda, MD 20892-5628
301-594-7474

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions, send email to 
lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit http://wiki.linuxvm.org/

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to