Ubuntu 18 (I think).
I was being able to login to a machine via SSH using my public key. Later I edited "/etc/ssh/sshd_config" so I could give password access to a third-party user I just created. I changed:
PasswordAuthentication yes AuthenticationMethods publickey,password
I thought this would allow me to use the publickey as default authentication method (so I could still log in as usually), else being prompted for a password (for the new user).
But it turns that it's now asking for BOTH things: publickey and password. I don't know the password, as I was granted access using the public key, so I can't access the website anymore. Additionally, the third party user can't access either, as no public key was configured for him.
How could I re-gain access again??? I've asked the original sysadmin, but doesn't seem able to help. Shouldn't this sysadmin be able to login the machine using the original root password created when he first setup the machine??? (with the main objective or resetting or fixing "/etc/ssh/sshd_config", then restarting the SSH server)