k2k 5 Posting Whiz

I udnerstand that setting up a public/private key authentication is a way to go when automating scp copy files to target machines.

however, I just now just to get a quick a dirty way to copy a number of files to a number of remote machines. My question is how to do that in a script?

I tried a couple attempts but haven't been sucessfully yet.

#!/bin/bash
echo "password" | scp source user@destination:\folder 

hope anyone can shed some light. Thanks much.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.