FileZilla fails to connect to Amazon EC2 via SFTP

Asked 2 years ago, Updated 2 years ago, 142 views

This is AWS' first time, so I'm sorry to ask you a rudimentary question.

Prerequisites/What you want to achieve

I would like to download a set of WordPress files on EC2 in FileZilla and upload them again after correcting them.(I want to repeat this)

What should I do to achieve the above mentioned things?

After configuring the key pair, the following error message occurred when trying to connect:

Problems/Error Messages you are experiencing

 command:trust new host key:once only
ERROR: Disconnected: No supported authentication methods available (server sent: publickey)
ERROR: Failed to connect to server

Tried

Supplementary information (for example, FW/Tool Version)

macOS High Sierra FileZilla 3.35.2

There are a lot of problems, but I'm in trouble because I haven't found a solution.
I'm sorry for the rudimentary matter, but I'd appreciate it if you could give me an answer.

amazon-ec2

2022-09-30 19:12

2 Answers

ERROR: Disconnected: No supported authentication methods available (server sent:publickey)

I'm not sure about FileZilla, but this error appears when the private key permissions are incorrect on the ssh connection.

Try setting the permission of the private key file to 0600 from the Mac Terminal.

Example

$chmod0600 path/to/your.pem


2022-09-30 19:12

The reason for the error is that we are generating a new key pair, which requires that the public key be registered in ~/.ssh/authorized_keys on the server, but it is not possible.

You rarely need to generate a new key pair to use filezilla, and you can use the key pair you use to connect to EC2 with SSH.Key pairs are often stored in ~/.ssh directories, but since they are hidden, it is better to enter them directly in the key file item or open a window where you can enter the path by pressing "Command+Shift+G".

In addition, if SSH specifies a private key to connect to AWS, the logon type is automatically specified if you set it to normal, ask for a password, or interactive instead of the key file.I think SSH is often used with a private key, so this setting is usually fine.


2022-09-30 19:12

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.