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
  • 3
  • Local login on the console may be your option. – Jacek Mar 21 '16 at 14:57
  • @Jacek, what do you mean by "local login"? – Galil Mar 21 '16 at 15:01
  • On the console - may be actually either local access or remote console. Whatever kind of console your server offers. – Jacek Mar 21 '16 at 15:07
  • But, it seems that I don't have the password to login using the console. I am asking if there is a default password for ubuntu, or in the worst case scenario how I can access the server again (even if physical reboot is required) – Galil Mar 21 '16 at 15:17
  • You need physical access to the server, boot to recovery mode, and set a password, and fix ssh. http://askubuntu.com/questions/24006/how-do-i-reset-a-lost-administrative-password – Panther Mar 21 '16 at 15:19
  • There's no such thing as default password. Anyway - if you have password logins also disallowed you can always try to run live or rescue disk,mount your server's disk - do necessary modifications and restart it back. – Jacek Mar 21 '16 at 15:19

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?