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/id_rsa2 [email protected]:/home/apps/dev/comp-eng/arena-client/build/arena-client-7.1.0.zip
and in output i am getting
usage: scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[user@]host2:]file2
i am using correct format i think.why i am facing this error instead of downloading file ??
You can use bare scp like scp -r user@remotehost:/path/to/directory /path/to/local to copy a directory from a remote machine to your local. If you need to keep directories in sync, you can use rsync .
In your local directory (the source), choose the files that you want to transfer, and drag and drop them into the Amazon S3 directory (the target). In the Amazon S3 directory (the source), choose the files that you want to transfer, and drag and drop them into your local directory (the target).
So there is common formula
scp -i <private key> <user>@<host>:<server file path> <local path to download file>
Example :
scp -i domain.pem [email protected]:/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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With