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 set up a new ec2 ubuntu server and I'm unable to use rsync to push a file up. I can ssh to the machine with my keypair. I'm not sure why this looks like it works but finishes in half a second and there is nothing in /home/ubuntu on the server.

➜  ~  rsync -av -i ~/.ec2/my-keypair ~/Downloads/pushcom.2012-06-26T01-10-04.gz
building file list ... done
>f..t.... gsg-keypair
>f..t.... pushwoodcom.2012-06-26T01-10-04.gz

sent 3624 bytes  received 64 bytes  7376.00 bytes/sec
total size is 3392  speedup is 0.92

I've tried 50 different ways of the rsync command but I can't get anything to work. Please help! Thanks

share|improve this question
Don't you need to specify the directory for ""? Something like – cjc Jun 27 '12 at 14:34
Yes, destination directory is mandatory when pushing files. It's only optional when pulling. – Magellan Jun 27 '12 at 14:39
There is a destination directory -- – David Schwartz Jun 27 '12 at 14:39
@DavidSchwartz That's not a directory. That's the username and server. The colon is required to delineate a directory. – Magellan Jun 27 '12 at 14:43
@Adrian: That's a path -- is a perfectly legal directory or file name. A colon is only required to specify both a server and a path (including an empty path). Only one thing is being specified here, so no colon is necessary. – David Schwartz Jun 27 '12 at 14:46

try with:

rsync -av -e "ssh -i ~/.ec2/my-keypair" ~/Downloads/pushcom.2012-06-26T01-10-04.gz

rsync has different syntax then ssh. Or you may use "scp" which has simmilar syntax as ssh (except with -p/-P for ports)

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.