automatic transfering of files using scp

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?

I don't think that scp/ssh/sftp family works with a HERE doc. You would have to setup public key authentication between the two systems. You can search the site for details on how to do that. Search for public key authentication on the forums.