Simulating - unix login + scp via shell scripts

Hi,

I am a new guy in this forum, I am trying to do the following stuff
and want some inputs

I am doing this manually, by using the scp command to copy file from
a remote unix machine and entering the password at the password prompt.

Like this,

scp -p user@machine.com:/tmp/test.sh .

user@machine.com's password:
test.sh 100% |***********************************************************************************************************| 66 00:00

How could i do this in a shell script, I mean, how will i simulate
entering of password via shell script ??
Please let me know.

Thanks in advance.

You could setup ssh keys so you don't have to worry about passwords:
http://www.arches.uga.edu/~pkeck/ssh/

Otherwise you could use expect?