scp

The purpose of this document is to explain the scp.

An example of distributing files with scp to a set of servers.

#!/bin/bash key_path="/home/prod/.ssh/id_rsa-mydist" bin_path="/path/to/bins.tar" my_ips=( "10.111.23.101" "10.111.23.102" "10.111.23.103" "10.111.23.104" "10.111.23.105" "10.111.23.106" "10.111.23.107" ) for ip in "${my_ips[@]}" do echo "SCPing to ${ip}..." scp -i "${key_path}" "${bin_path}" "mydist@${ip}:/home/mydist/distro/" done echo "Done all"

[Edit]