i have an instance of ec2.it have some files.i tried to download my file from ec2 instance to my local Ubuntu 13.10.i run this command
scp -i /home/ritesh/.ssh/
I find a simple solution for importing a file from EC2 to local machie
cd ~/.ssh
scp -i mykey.pem ec2-user@ipadress.zone.compute.amazonaws.com:/home/path/file ~/Desktop/target
Downloading file to your local machine .....
Hope it will be helpfull to someone
For EC2 ubuntu
go to your .pem file directory
scp -i yourkey.pem ec2user@DNS_name:/home/ubuntu/foldername/filename ~/Desktop/localfolder
So there is common formula
scp -i <private key> <user>@<host>:<server file path> <local path to download file>
Example :
scp -i domain.pem ec2-user@ec2-51-171-173-159.ap-southeast-1.compute.amazonaws.com:/var/www/html/drupal/web/sites/default/files/test.jpeg /Users/ramesh/Downloads
Below is explanation
You can go to you EC2 Instance select it -> Click on Actions -> Connect, you will get the details
You need to specify your download location. If its the current directory, you can just add a .
.
scp -i /home/ritesh/.ssh/id_rsa2 apps@XXX.20.24.XXX:/home/apps/dev/comp-eng/arena-client/build/arena-client-7.1.0.zip .