我已经创建了一个AWS EC2实例,我希望能够以最简单和最直接的方式使用FileZilla将文件上传到服务器目录。
当前回答
这是非常简单的,如果你使用你的pem文件(我使用macOS / windows用户可以遵循相同的步骤)。
下载你的FileZilla(我用的是macOS -下载了免费版,这就足够了) 在FileZilla(⌘S)中打开站点管理器->新站点
在Host字段中输入主机名。
例如:eca -**-**-**- 据美联社-西南- 9. - 111. compute.amazonaws.com
选择“协议”为“SFTP - SSH文件传输协议” 选择登录类型为密钥文件 在user字段中输入你的用户名:对我来说是ubuntu(找到你的ssh用户)
注意:
操作系统vs用户名 Amazon - ec2-user Centos - Centos Debian管理员或根用户 Fedora - ec2-user RHEL - ec2用户或root用户 SUSE - ec2-user或root Ubuntu - Ubuntu或root
对于Key file字段,浏览pem文件:并单击Connect
就是这样:)玩得开心!
注意:
(记住允许SSH连接到您的IP地址从EC2)如果不是,您将得到连接错误消息!
注意:允许您的IP通过SFTP连接您的AWS实例
EC2 -> SecurityGroups -> SSH -> Inbound rules -> Edit -> Add Rule ( SSH|TCP|22|My IP(it's get IP automatically | name for rule) ->保存
其他回答
老问题,但我发现,所有你需要的是添加ppk文件。 设置—>连接—> SFTP—>添加keyfile 用户名和主机与您在http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-connect-to-instance-linux.html中提到的使用putty时提供的相同 也许能帮到别人。
最简单直接的方法就是创建一个FTP登录。 这是一个关于stackoverflow本身的简单易懂的教程网站,如何在2分钟内完成设置… 在亚马逊云服务器上设置FTP
您可以使用任何FTP客户端。我使用winscp,它工作得很好。在所有这些客户端中;可以指定SSH安全密钥。
如果你习惯使用命令行,并且使用git bash从你的PC上ssh到远程服务器(ubuntu等),你可以使用如下所示的sftp,它总是很有效,而且看起来非常快。pem文件可以从aws EC2或Lightsail或任何服务器下载。在以下命令中替换pem文件的路径/namd。还要将IP地址替换为远程服务器的IP地址[例如远程Unix或linux/ubuntu服务器]。
$ sftp -i /c/Users/pat/Downloads/LightsailDefaultKey-us-east-1-2.使用实例pem ubuntu@123.45.6789
使用sftp实际上传/下载的附加命令 转到远程文件夹 sftp > pwd Sftp > CD /home/ubuntu/mymedia
进入本地文件夹 sftp > lpwd 本地工作目录:/ sftp> lcd /c/Users/pat/Desktop/Camtasia . sftp 上传本地文件到服务器 Sftp > put * 如果需要下载到本地PC,可以使用get Sftp > get *
注意:这类似于ssh使用pem文件连接到远程。 $ ssh -i /c/Users/pat/Downloads/LightsailDefaultKey-us-east-1-2。pem ubuntu@123.45.6789
谢谢!
我为此制作了一个视频教程。只是检查:
使用FileZilla和SFTP连接Amazon EC2文件目录,视频教程
以上视频教程总结:
Edit (Preferences) > Settings > Connection > SFTP, Click "Add key file” Browse to the location of your .pem file and select it. A message box will appear asking your permission to convert the file into ppk format. Click Yes, then give the file a name and store it somewhere. If the new file is shown in the list of Keyfiles, then continue to the next step. If not, then click "Add keyfile..." and select the converted file. File > Site Manager Add a new site with the following parameters: Host: Your public DNS name of your EC2 instance, or the public IP address of the server. Protocol: SFTP Logon Type: Normal User: From the docs: "For Amazon Linux, the default user name is ec2-user. For RHEL5, the user name is often root but might be ec2-user. For Ubuntu, the user name is ubuntu. For SUSE Linux, the user name is root. For Debian, the user name is admin. Otherwise, check with your AMI provider." Press Connect Button - If saving of passwords has been disabled, you will be prompted that the logon type will be changed to 'Ask for password'. Say 'OK' and when connecting, at the password prompt push 'OK' without entering a password to proceed past the dialog. Note: FileZilla automatically figures out which key to use. You do not need to specify the key after importing it as described above.
如果你使用Cyberduck,请遵循以下步骤。
如果你有任何权限问题,请查看这篇文章。
推荐文章
- 拒绝访问;您需要(至少一个)SUPER特权来执行此操作
- 我如何使用通配符“cp”一组文件与AWS CLI
- 我如何获得亚马逊的AWS_ACCESS_KEY_ID ?
- 如何使所有对象在AWS S3桶公共默认?
- 为什么我应该使用亚马逊Kinesis而不是SNS-SQS?
- 如何重命名AWS S3 Bucket
- AWS ECS中的任务和服务之间有什么区别?
- 亚马逊SimpleDB vs亚马逊DynamoDB
- 亚马逊ECS和亚马逊EC2有什么区别?
- 我如何知道我在S3桶中存储了多少对象?
- S3 Bucket操作不应用于任何资源
- 将AWS凭证传递给Docker容器的最佳方法是什么?
- 当权限为S3时,AccessDenied for ListObjects for S3 bucket:*
- 电子邮件地址未验证(AWS SES)
- 使用Boto3将S3对象作为字符串打开