在Amazon EC2上载文件 [英] Uploading files on 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屋!