Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29539

Uploading a directory from local to ec2 instance using RSYNC

$
0
0

Here is the command I am using to move my ProjectLocal directory to the EC2 ProjectRemote Directory (obviously I replaced some real values with fake ones):

rsync -ravze "ssh -i ~/Desktop/myPemFileHere.pem " --exclude '.git/' --exclude 'node_modules/' ~/pathToMyLocalDirectory/ProjectLocal  ubuntu@ec2instanceIDhere:/ProjectRemote

It is responding with this error message:

Warning: Identity file /home/ubuntu/Desktop/myPemFileHere.pem not accessible: No such file or directory.
ubuntu@ec2InstanceIDHere: 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(235) [sender=3.1.2]

The fact that it is trying to find my pem file on "/home/ubuntu/{path I specified}" makes me think it is trying to find my pem file on the EC2 instance directory instead of my local directory.... shouldn't it be looking at my local directory for this? I believe this is the root of the issue. THanks for the help


Viewing all articles
Browse latest Browse all 29539

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>