How Can I Download a File from EC2 [closed]

匿名 (未验证) 提交于 2019-12-03 02:44:02

问题:

What scp arguments should I use to download a file from an Amazon EC2 instance to local storage?

回答1:

Use scp:

scp -i ec2key.pem username@ec2ip:/path/to/file . 

where:

  • ec2key.pem is your PEM key
  • username is the username you log in with
  • ec2ip is the IP or DNS alias of the instance
  • /path/to/file is the location where the file is stored

This will copy the file into the current folder on the local machine.

You can read more here on how to access your instance with ssh if you haven't done already:

When you are able to ssh as in the above doc, you will be able to use scp to copy the file.

Another option is to bring up some Web server on your instance, configure HTTPS if your file is sensitive and then download using your browser, here are some tutorials:



回答2:

If you are using Mac or Linux you can use scp or even more friendly, download an FTP client, if you are on Mac I recommend you to use CyberDuck. In the end all you need is an FTP client. If you are on Windows I would recommend you Filezilla.

What OS are you in?

Since you are in Ubuntu, try this:

  • Enter the server address, select the type of server, and enter any additional information as required. Then click Connect. Details on server types are listed below.

  • For servers on the internet, you can usually use the domain name. For computers on your local area network, however, you may have to use the computer's numeric IP address. If the other computer is running Ubuntu, see Find your IP address to find that computer's internal IP address. Otherwise, check the help on that computer.

  • A new window will open showing you the files on the server. Browse the files and folders just as you would for local files and folders.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!