1,105,423 Community Members

scp script bypass password

Member Avatar
k2k
Posting Whiz
354 posts since Nov 2007
Reputation Points: 5 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

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.

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article