Sponsored Content
Full Discussion: Does anybody know this??
Top Forums Shell Programming and Scripting Does anybody know this?? Post 52734 by sm321 on Thursday 24th of June 2004 11:21:07 AM
Old 06-24-2004
Does anybody know this??

Hi:
I am trying to SFTP some files thru Ksh I want to run the script(see below) thru scheduler. If I run this script it prompts for the password, Is there any way that it could be automated or read thru some file.
I know we could do it in FTP but FTP is not an option .. i HAVE to use SFTP

#!/usr/bin/ksh
$INFILE="Input.txt"
while read -r i
do
cd /home/$i/logs
/usr/bin/sftp user@host <<EOF >>output.log
put *.log
quit
EOF
done<$INFILE

I checked the FAQ's still doesn't help ... Also I am not sure whether I have I could create any *key or *pub files on the remote server.. I have to ftp from 8 different servers to the same server
Any feed back appreciated
Thanks
 
All times are GMT -4. The time now is 07:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy