This question already has an answer here:
I have the below line in a script. When I run it, it prompts for a password to copy files in the server. I need the password to be taken from the script.
for i in cat forwarders do scp -o StrictHostKeyChecking=no $filename $tarfile badgeid@$i:/tmp; done