Computing.Net > Forums > Unix > sftp Korn shell script

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

sftp Korn shell script

Reply to Message Icon

Name: Bob Hicks
Date: March 18, 2003 at 12:39:58 Pacific
OS: AIX 4.3
CPU/Ram: UNIX
Comment:

I am trying to write a Korn shell script to use sftp to transfer data from one system to another. I cannot seem to figure out how to send the required password to log on to the remote system. I have tried:
including PASS ${PASSWD} in the param_file,
using the command FTP_OUT="sftp -v -b param_file ${USER}@${HOST} ${PASSWD}"

and many variations.
Every time I submit the script I get back an interactive message asking me to manually enter the password.
Do you know how to send the password programmatically?
Generally this is the Korn shell command string I am using:
FTP_OUT="sftp -v -b param_file ${USER}@${HOST}"
eval "${FTP_OUT}" >> ${XFR_LOG} 2>&1

param_file contains the command to be used such as
pwd
put file_name file_name
bye
Thanks for you help.




Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: sftp Korn shell script

Korn shell script doubt ??? www.computing.net/answers/unix/korn-shell-script-doubt-/3407.html

Korn Shell script for julian date? www.computing.net/answers/unix/korn-shell-script-for-julian-date/3729.html

Korn shell script www.computing.net/answers/unix/korn-shell-script/7285.html