0

can scp be used to send single file to multiple remote servers at the same time? If so what's that? if not, what's the alternative?

N. F.
  • 101
  • 3

4 Answers4

1

I will suggest you write a script that allows you to run scp to each server in the background. This can be achieved by using a for loop. I hope this helps.

tdops
  • 11
  • 1
1

You can use cssh to login to all the destination servers, then you can run a single command in everyone to scp the file from the source to a common path in the destinations

daniel2ac
  • 11
  • 1
  • Sounds interesting. Providing a link to cssh (or more details on how to use it in this situation) would be helpful. – pjmorse Sep 24 '12 at 00:05
  • 1
    It's in the package "clusterssh", you can use it to login in and run the same command in many servers at the same time, in this case run the scp to get the source file XD – daniel2ac Sep 24 '12 at 16:44
1

Check out parallel-scp as described in the Debian Administration article Automating ssh and scp across multiple hosts.

Jeff Ferland
  • 20,547
  • 2
  • 62
  • 85
0

I have decided to use parallel-distributed shell(pdsh) for that.

N. F.
  • 101
  • 3