Just for running a test I want to put an image file into one of my instance folders from my Desktop.
I've tried solutions provided at this same topic question: Rsync to Amazon Ec2 Instance
So I've tried:
sudo rsync -azv --progress -e "ssh -i ~/.ssh/MyKeyPair.pem" \ ~/Desktop/luffy.jpg \[email protected]:/home/ec2-user/myproject/mysite/mysite/media
~/.ssh/ is where MyKeyPair.pem is located. In fact, to enter via ssh I do first cd ~/.ssh and then I run the ssh -i ... command.
But I'm getting this error:
Warning: Identity file ~/.ssh/MyKeyPair.pem not accessible: No such file or directory.
Permission denied (publickey).
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]
I've read on another Q&A page someone who got this same error reporting he solved it by just installing rsync via yum. In my case it is already installed (version 3.0.6).
I would be grateful if anyone can help!
Warning: Identity file /home/ec2-user/.ssh/MyKeyPair.pem not accessible: No such file or directory.
– Apollonius