I have a Public Cloud instance via OVH. I reinstalled my computer without backing up my ssh-key. I also forgot the root password for the server. I do have access to my Public Cloud control panel and rebooted with rescue mode.
However, when I change my root password (via the noVNC console) and then reboot to my Ubuntu disk, the new password is incorrect.
The passwd command returns: passwd: password updated successfully!.
But then I can't login as root with the new password after exiting rescue mode.
What am I doing wrong?:
By default, password login for root and the default user is not possible by ssh. If you used a key, you'll need to replace that key via the Rescue Mode. You can follow that guide to do that : Replacing your lost ssh key pair
Also, remember that you need to mount your partition containing your OS before doing any modification. The step are well describe in the OVH documentation here : Put an instance in Rescue Mode