If you’ve lost access to your OVH Dedicated Server or simply need to reset the root password, you can do this via Rescue Mode. Follow the steps below:
Step 1: Boot into Rescue Mode
- Log in to the OVH Control Panel.
- Select your server.
- Go to Rescue Mode and enable it.
- OVH will email you temporary credentials to access the server via SSH in rescue mode.
Step 2: Mount the Server Filesystem
Once logged into the server via SSH using the rescue credentials:
mount /dev/sda1 /mnt/
mount /dev/sda2 /mnt/vz
mount -a
chroot /mnt/
Step 3: Change the Password
Now set a new password for the root user:
passwd
- Enter the new password when prompted.
- Confirm the new password.
Step 4: Reboot to Normal Mode
- Exit from the
chroot
environment:
exit
- Go back to the OVH Control Panel.
- Switch the server boot option back to normal mode.
- Reboot the server.
Step 5: Log In with New Password
Once the server is back online, you can SSH into your server using the new root password you set.
Note: If your partitions differ (e.g., sda2
doesn’t exist), adjust the mount points accordingly. Use lsblk
or fdisk -l
in rescue mode to identify them.