Question

Trying to log into FTP: "Error: Disconnected: No supported authentication methods available (server sent: publickey)"

Posted March 8, 2018 16.5k views
WordPressNetworkingUbuntu 16.04

I own an automotive detailing business, my website is www.evansdetailing.com. I am having some issues with my Divi theme ever since I shut the server down, and recently started it again from the Snapshot. I’ve experience what I think would be data corruption.

I am trying to login my FTP in order to attempt in reinstalling my theme. However, I am getting the error “Error: Disconnected: No supported authentication methods available (server sent: publickey)” whenever attempting to login to the FTP. Terminal on mac will not connect to ssh with a very long error about how somebody may be attacking, at the very end saying, “Host Key Verification Failed.”

Does anybody have an idea of what I need to do? I’ve been searching and tried a few articles on here, however nothing seems to be letting me in.

Thanks for any help!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

Every SSH server has a (unique) host key associated with it, just like how you would use an SSH key on your end to log in to it. When you connect to a server for the first time, your SSH client saves the fingerprint of the host key and saves it. Every time you connect to the same hostname, SSH verifies that it sent the same key and is not another server pretending to be it.

When you recreated your server from a snapshot, a new host key was generated. Because they share the same hostname/IP address, you are getting a Host Key Verification Failed error while trying to connect via SSH. Since you know that that is the case, you can go ahead and delete the old host key fingerprint from your Mac so you can connect to your new Droplet:

ssh-keygen -R hostname

where hostname is the hostname that you SSH to, whether it be your domain name or Droplet’s IP address:

ssh user@hostname

As for the SFTP client error, No supported authentication methods available (server sent: publickey), it basically says that the server said it supported public key authentication only, and your SFTP client wasn’t able to provide that. Go into the client’s settings and add your SSH key to the authentication settings. It’s usually located in ~/.ssh/id_rsa.

Hello, @theisevan

You can double-check the configured settings in FileZilla and make sure that the ssh-key is added/present.

Configure FileZilla
After you install FileZilla, you need to configure it to connect to the Droplet.

Open FileZilla and then click Settings in the Edit drop-down menu.

In the Connection section, click SFTP. This is where you add your Droplet’s private SSH key. Click Add key file…, then locate your Droplet’s private SSH key on your local machine. If FileZilla prompts you to convert the file into a supported format, click Yes.

After you add the SSH key, open the File drop-down menu and click Site Manager. The site manager lets you add, remove, and manage servers and devices that you want to connect to using FileZilla.

Click New Site and enter the name of the Droplet. In the protocol field, select SFTP from the drop-down menu. Enter information for the following fields:

  • Host: The IP address of your Droplet.
  • Port: Enter the port you use to connect to the Droplet (port 22 is the default).
  • Logon Type: Select Interactive.
  • User: Enter the username you are connecting to the Droplet with (root is the default user on most Droplets).

Once you have entered your settings, click Connect. The status field in the top window displays the status of the connection.

You can check this article on How to Transfer Files to Droplets With FileZilla

and also this one How To Use Filezilla to Transfer and Manage Files Securely on your VPS

https://www.digitalocean.com/community/tutorials/how-to-use-filezilla-to-transfer-and-manage-files-securely-on-your-vps

https://docs.digitalocean.com/products/droplets/how-to/transfer-files/

On another note, the site looks nice and your work looks amazing!

Hope that this helps!
Regards,
Alex

by Pablo Carranza
This article will teach you how to use Filezilla to transfer and manage files securely on your VPS.