How to download a file from EC2 instance to Local Computer

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 apps@XXX.20.24.XXX:/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 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 .


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

链接地址: http://www.djcxy.com/p/92204.html

上一篇: 使用所有ssh密钥集从第三台服务器在两台服务器之间进行远程复制

下一篇: 如何将文件从EC2实例下载到本地计算机