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

Posted March 8, 2018 14.2k views
WordPressNetworkingUbuntu 16.04

I own an automotive detailing business, my website is 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
1 answer

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.