0

I forgot that I wasn’t using SSH Key for that particular VPS and mistakenly added the following line in my VPS sshd_config: “PasswordAuthentication no”

And restarted the server through command. Now, I’m unable to login to my OVH VPS as it displays: “No supported authentication methods available (server sent: publickey)

Please, let me know if there is any possible solution to this problem as I have my important website hosted on this server.

Thanks

1 Answers1

4

When you get locked out and can no longer use network based access to manage a server (i.e. you firewall or otherwise disable SSH, are the victim of an attack etc.) many VPS providers provide you with out-of-band management access that will work regardless.

You can then either log in on a local console (or boot from a rescue image) and fix what you broke.

https://www.ovh.com/world/g1276.using_kvm_for_vps

HBruijn
  • 72,524
  • 21
  • 127
  • 192
  • One more issue. I am able to use root credentials using KVM but still, I can't root login via FileZilla or any other FTP program. Tried creating an SFTP login which works fine on FileZilla too but the issue with root still persists. – Narender Chopra May 01 '18 at 07:53
  • Typically the root account is disabled for remote logins in your sshd_config (a very reasonable default) – HBruijn May 01 '18 at 13:21
  • Yeah! Finally, after numerous tries, got it working. Thanks :) – Narender Chopra May 02 '18 at 13:41