Changing or Resetting the root Password
Using the Control Panel
The easiest way to reset the root user's password is to use your control panel, available on the Dashboard tab.
This method works even if you have lost the old password, since you do not need to enter it.
When Connected via SSH
If You Know the Current Password
If you have the current root password but want to change it, follow these steps:
1. Connect to the server via SSH using the root username and the current password.
2. Run the following command:
passwd
3. The system will ask you to enter the new password twice. Do so.
Done: the password has been changed. You can now log in as root with your new password.
If You Do Not Know the Current Password
If you do not know the current root password and want to reset it, you can do so by booting the server from a rescue disk. This method works for all Linux-based operating systems.
1. Boot the system in rescue mode.
2. Run the following commands in the console:
mount -o rw /dev/vda1 /mnt
chroot /mnt /bin/bash
passwd root
3. Enter the new root password when prompted. Once the password has been changed, you will see a confirmation message (for example, "passwd: all authentication tokens updated successfully" or "password updated successfully", depending on your operating system).
4. Press ctrl + D to exit the chroot.
5. Unmount the disk with the command:
umount /mnt
6. To reboot the system cleanly, remount the root file system in read-only mode:
mount -o ro /dev/vda1 /mnt
7. Reboot the server in normal mode from the account control panel. You can now connect to the server as the root user with the new password.