我已经创建了一个AWS EC2实例,我希望能够以最简单和最直接的方式使用FileZilla将文件上传到服务器目录。
当前回答
老问题,但我发现,所有你需要的是添加ppk文件。 设置—>连接—> SFTP—>添加keyfile 用户名和主机与您在http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-connect-to-instance-linux.html中提到的使用putty时提供的相同 也许能帮到别人。
其他回答
老问题,但我发现,所有你需要的是添加ppk文件。 设置—>连接—> SFTP—>添加keyfile 用户名和主机与您在http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-connect-to-instance-linux.html中提到的使用putty时提供的相同 也许能帮到别人。
我为此制作了一个视频教程。只是检查:
使用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,请遵循以下步骤。
如果你有任何权限问题,请查看这篇文章。
FileZilla不为我工作,我一直得到这个错误:
Disconnected: No supported authentication methods available (server sent: publickey)
有效的是sftp命令。
连接EC2实例
sftp -i "path/to/key.pem" ec2-user@ec2-54-212-34-84.us-west-2.compute.amazonaws.com
下载文件/ dirs
下载路径/ To /source/file.txt和路径/ To /source/dir:
lcd ~/Desktop
cd path/to/source
get file.txt
get -r dir
上传文件/ dirs
将localpath/ To /source/file.txt和~/localpath/ To /source/dir上传到remotepath/ To /dest:
lcd localpath/to/source
cd remotepath/to/dest
put file.txt
put -r dir
你所要做的就是: 1. 在filezilla上打开站点管理器 2. 添加新站点 3.如果端口不是默认端口,请给出主机地址和端口 4. 通信类型:SFTP 5. 会话类型密钥文件 6. 把用户名 7. 选择关键文件目录,但注意Windows文件资源管理器寻找PPK文件作为默认选择下拉菜单上的所有文件,然后选择你的pem文件,你就很好了。
因为你添加了新的网站和配置下次当你想连接时,只需选择你保存的网站和连接。就是这样。
对于已被广泛接受的答案,有一个小小的说明 Yasitha Chinthaka:
注意:FileZilla会自动找出要使用的键。你不需要 需要在如上所述导入密钥后指定密钥。
在我的例子中,我已经从我过去使用的其他实例中获得了其他5个ppk(新实例的ppk位于列表的底部)。我添加了新实例的新ppk,但它不让我连接到它。错误信息:too many tries / attempts。
在我删除了未使用的ppks后,我终于能够登录到实例。
所以不,Filezilla没有那么聪明;-)
推荐文章
- 我如何获得亚马逊的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对象作为字符串打开
- AWS VPC - Internet网关vs. NAT
- 如何在AWS Lambda中加载npm模块?