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
RTM:
I guess I had to do that because looking at the subject ppl wont respond as they think I dint look at thread. Sorry about that
but the thread actually doesnt help me I if i take user@host off then, it gives me back
You still need the host bit. Just remove the user@ portion. You'll then need to add a "user username passwd" command in the here document to compensate.