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

I have multiple EC2 instances that share the same directory and files in /var/www.

Now, everytime I need to upload, I need to use an sftp client, it is good maybe if I have only one server but, I would like to be able to transfer my changes to all the servers. I heard it can be done with unix sftp? But how?

Thanks in advance

share|improve this question
Why don't you upload to one instance, and they kick off, say, an rsync to get the files to the other ones? If anything, you save on AWS transfer costs, as the network traffic on the rsync will be inside AWS. – cjc Apr 25 '12 at 22:40

Take a look at LFTP. This should do the trick. You can set up multiple SFTP server connections and upload it.
You can also look here for the information: There this was discussed.

share|improve this answer
can public keys be used with it? I don't see anything regarding them – enrico Apr 25 '12 at 22:28
That's not related with LFTP. LFTP just uses the connections and it will use your existing public keys. – thonixx Apr 25 '12 at 22:39

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.