I have an EC2 instance running (FreeBSD 9 AMI ami-8cce3fe5), and I can ssh into it using my amazon-created key file without password prompt, no problem.
However, whe
scp -i /path/to/your/.pemkey -r /copy/from/path user@server:/copy/to/path
copy a file from a local server to a remote server
sudo scp -i my-pem-file.pem ./source/test.txt ec2-user@1.2.3.4:~/destination/
copy a file from a remote server to a local machine
sudo scp -i my-pem-file.pem ec2-user@1.2.3.4:~/source/of/remote/test.txt ./where/to/put
So the basically syntax is:-
scp -i my-pem-file.pem username@source:/location/to/file username@destination:/where/to/put
-i
is for the identity_file