Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
What exactly does resetting the root password do? Can't ssh in anymore.
Server was working fine. Used public key auth to ssh in using Putty. Passwords disabled, etc.
Everything was working fine until I wanted to make changes on my server and realized forgot my (sudoer) user password. Mistakenly, in hopes of fixing the problem, I reset the root password through the web interface (not the user password, which I actually needed).
After having done so, every time I try to connect (with Putty) it now asks for a password. I went through /etc/ssh/sshd_config and made sure all the options are correct. Created a new key pair, restarted server, etc. Still, the behavior persists, although I can see it is checking the keys (tried testing using the old key, it tells me the server refused the key, but still asks for a password)
I’m wondering what exactly happened during the root password reset that could cause this. It makes sense that it would change the ssh configuration to allow password log ins (since I imagine that is what most users are intending when they reset root password) If that is correct, it has done so in a non-obvious way as I have gone through the config file myself and don’t see what could be causing this.
I’ve also tried changing the user password through the rescue console and resetting the root password twice. None of the passwords work when trying to log in over ssh, always giving the message “Access Denied”.
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.×