Take the 2-minute tour ×  I'm able to ssh -i mykey.pem to EC2.
I'm able to scp -i mykey.pem to EC2. But when I try to rsync
-avz -e "ssh -i mykey.pem" I get this error:  Warning: Identity
file mykey.pem not accessible: No such file or directory.
Permission denied (publickey). rsync error: unexplained error
(code 255) at io.c(605) [sender=3.0.9]  Any suggestions what
I've done wrong?  share|improve this question Have you
considered setting up an SSH agent, or adding the key to your
.ssh/config file so you don't need to provide an option at all?
–  Zoredache Sep 24 '12 at 21:46 @Zoredache I don't know how to
do that but it sounds like a good idea. –  isomorphismes Sep 24
'12 at 21:49 Identity file - serverfault.com/a/418755/984 – 
Zoredache Sep 24 '12 at 22:12 what's the permissions on the pem
file ? (la -l) –  Sirex Sep 24 '12 at 22:22 @Sirex I changed
them to chmod 400 mykey.pem based on some advice elsewhere on
the Web. (or maybe it was based on an error message) – 
isomorphismes Sep 26 '12 at 3:13  2 Answer