I'm in the process of writing a shell script with copies files from one linux box to another using scp. I wish to run this through a cronjob so it cannot be interactive.
This is what I have so far.
#!/bin/sh
PASSWD='passswd'
dateset=$( date | awk '{print $2 $3 $6}')
for dates in $dateset; do
dateset2=$dates
done
cd /home/user
scp -r user@host:/home/user/$dateset2.db.gz . << END_SCRIPT
quote PASS $PASSWD
END_SCRIPT
exit 0
it still asks me for the password though.
It works if I use ftp (but I'd rather use something more secure)
Might anyone be able to offer suggestions?