我已经创建了一个AWS EC2实例,我希望能够以最简单和最直接的方式使用FileZilla将文件上传到服务器目录。
当前回答
如果有人执行了所有步骤但没有成功,请确保您使用了正确的用户。我试图使用“ec2-user”,但我需要使用“ubuntu”。
其他回答
确保使用22端口。Filezilla将默认使用SFTP端口21。
在我的例子中,Filezilla将AWS ppk文件发送到我试图安全连接的每个其他FTP服务器。
这太疯狂了。下面有一个解决方案,但它很难看。
正如@Lucio M指出的那样,它的表现并不好。
从这个讨论:https://forum.filezilla-project.org/viewtopic.php?t=30605
n0lqu:
同意了。但是,鉴于我不能控制服务器的操作,是否有任何方法可以在FileZilla中指定站点应该使用密码而不是密钥进行身份验证,反之亦然?或者告诉它先尝试密码,然后密钥只有当密码失败?在我看来,它首先尝试了密钥,然后没有机会尝试密码。
Filezilla admin回复:
没有这样的选择。
n0lqu:
是否可以添加这样的选项,或者是否有任何人都可以推荐的好的变通方法?目前,我所知道的唯一解决办法是从一般首选项中删除键,只有在连接到需要它的特定网站时才添加它,然后在完成后再次删除它,这样它就不会扰乱其他网站。
botg:
现在,您可以有两个FileZilla实例,它们具有单独的配置dirs(例如,一个已安装,一个可移植)。
Timboskratch:
I just had this same issue today and managed to resolve it by changing the "logon type" of the connection using a password in the site manager. Instead of "Normal" I could select either "Interactive" or "Ask for Password" (not really sure what the difference is) and then when I tried to connect to the site again it gave me a prompt to enter my password and then connected successfully. It's not ideal as it means you have to remember and re-type you password every time you connect, but better than having to install 2 instances of FileZilla. I totally agree that it would be very useful in the Site Manager to have full options of how you would like FileZilla to connect to each site which is set up (whether to use a password, key, etc.) Hope this is helpful! Tim
还看到: https://forum.filezilla-project.org/viewtopic.php?t=34676
所以,看起来:
对于多个具有密钥/密码的FTP站点,使用多个Filezilla安装, 或者, 对所有服务器使用相同的PPK密钥。
我希望有一种方法告诉FileZilla哪个ppk是为站点管理器中的哪个站点
您可以使用任何FTP客户端。我使用winscp,它工作得很好。在所有这些客户端中;可以指定SSH安全密钥。
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
如果你习惯使用命令行,并且使用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
谢谢!
推荐文章
- 拒绝访问;您需要(至少一个)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对象作为字符串打开