I connected to Amazon's linux instance from ssh using private key. I am trying to copy entire folder from that instance to my local linux machine .
Can anyone tell me the correct scp
command to do this?
Or do I need something more than scp
?
Both machines are Ubuntu 10.04 LTS
another way to do it is
scp -i "insert key file here" -r "insert ec2 instance here" "your local directory"
One mistake I made was scp -ir
. The key has to be after the -i
, and the -r
after that.
so
scp -i amazon.pem -r ec2-user@ec2-##-##-##:/source/dir /destination/dir