在 Amazon EC2 上上传文件 [英] Uploading files on Amazon EC2

查看:32
本文介绍了在 Amazon EC2 上上传文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Amazon EC2 实例正在运行.当我访问 url 时,我得到了 Apache 测试页面,它说我必须将我的文件上传到 /var/html/

I have an Amazon EC2 instance running. When i access the url, I get the Apache Test page, and it says that i'll have to upload my files into /var/html/

我的问题是,我该怎么做?我使用 Mac OS X 的终端来访问实例.

My question is, how do i do it? I use Mac OS X 's terminal for accessing the instance.

FTP 似乎不起作用.还有其他办法吗?

FTP doesn't seem to work. Is there any other way?

推荐答案

如果您使用的是 Mac(或其他 *nix 系统),只需将其复制粘贴到终端即可通过 SSH 上传文件

If you're using a Mac (or other *nix system), simply copy-paste this to terminal to upload a file via SSH

scp -i MyKeyFile.pem FileToUpload.pdf ubuntu@ec2-123-123-123-123.compute-1.amazonaws.com:FileToUpload.pdf

将ec2-123-123-123-123.compute-1.amazonaws.com"替换为您实例的公共 DNS 名称

replace "ec2-123-123-123-123.compute-1.amazonaws.com" with your instance's public DNS name

这篇关于在 Amazon EC2 上上传文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆