Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

First of all I am not a trained professional in Networking nor I know much about it. I have some knowledge of GNU/Linux, Shell scripting. One day I wanted to copy a large zipped file to a set of computers in my lab and have to do some other tasks there. I use DHCP for my systems.

Looking for the best way to do that.

Sorry if this question not belongs here or is utter nonsense.

share|improve this question
All of them running Linux? Did you setup ssh public key authentication? – quanta Aug 30 '11 at 6:43
@quanta All systems runs Debian. I didnt have ssh server. Only client installed. Looking for an easy solution. Security is not a problem since all the systems are in local network only and data is not that important – user71866 Aug 30 '11 at 6:46

There are multiple ways of accomplishing a file copy/transfer between systems ranging from:

  • scp
  • smb
  • ftp (or any of its more secure variants)
  • nfs
  • http
  • etc., etc....

It comes down to what is installed on the systems and your level of comfort with the various options. There are "multicasting" options, if the one-to-multiple copy situations come up frequently enough to consider those technologies/solutions.

share|improve this answer

Func is an excellent tool to copy a file to multiple machines and also executing commands on multiple machines, developed by RedHat and the community. Excellent to manage clusters of servers etc. However I'm not sure it works flawlessly with DHCP, you need signed certificated to communicate with clients, but it's wrth testing if it suits your needs

share|improve this answer

http + wget FTW.

Set up a web server on one central host then use wget to download the file.

share|improve this answer

Fabric seems to be your solution :

share|improve this answer

The standard method on Unix used to be rdist and it is still available in most repositories today. However today's problem is that we use SSH not RSH and so the management of keys and passwords may be more inconvenient.

share|improve this answer
  1. Create a list of your target servers, e.g list.txt:

    ip1 port1 username1 password1
    ip2 port2 username2 password2
  2. Install sshpass on the client.
  3. Create a shell script as belows:

    while read line; do
        ip=`echo $line | awk '{ print $1 }'`
        port=`echo $line | awk '{ print $2 }'`
        user=`echo $line | awk '{ print $3 }'`
        password=`echo $line | awk '{print $4 }'`
        echo $password | sshpass scp -P $port /your/zipped/file $user@$ip:/path/to/somewhere/
    done < list.txt
  4. Make it executable and run with:

    chmod +x

If you need to do the same tasks later, I would suggest installing ssh public key authentication and do parallel with pssh, something like this:

cat list.txt
ip1:port1 username1
ip2:port2 username2

pscp -h list.txt /your/zipped/file /path/to/somewhere
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.