1

I am not very familiar with ssh and I am afraid I made a disastrous mistake.

There is an old server which used public key authentication. My public key was in the authorized keys, so I was able to access it. The user was the default 'ubuntu' user and I am pretty sure that it had no password.

I disabled the public key authentication, setting the "PubkeyAuthentication" to "no".

Now I am locked out as when I type

ssh ubuntu@[host_IP] 

I need to give a password and then I get

Permission denied, please try again

I think there was no password for this user. I am sure that I didn't have to give any password for sudo commands

Is there any way to access the server again?

Galil
  • 111

1 Answers1

-1

I think the best option here is to reboot the system into single user mode and make configuration changes from there. (i.e. update the ssh configuration or set a password) Check here for details on getting into single user mode: How do I boot into single-user mode from GRUB?