How to download a file from EC2 instance to Local Computer

后端 未结 4 2076
南方客
南方客 2021-02-06 06:22

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/         


        
4条回答
  •  耶瑟儿~
    2021-02-06 06:50

    So there is common formula

    scp -i  @: 
    

    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

    1. private file - .pem file with location
    2. user - Your AWS user
    3. host - Your AWS host URL
    4. sever file path - Full file path from server
    5. local path to download file - Local folder location where you want to store your downloaded file

    You can go to you EC2 Instance select it -> Click on Actions -> Connect, you will get the details

提交回复
热议问题