Home Technical Reset VPS password via Rescue ISO

Reset VPS password via Rescue ISO

Last updated on Aug 28, 2026

Typically, if you forget your VPS password, you can reset it via the Rescue tab in the server control panel. However, if you set up the server using a custom ISO file (instead of using the Rebuild function), the Rescue feature will not work. In this case, you need to reset the password by mounting a rescue ISO file. Please follow this instruction to reset your password via Rescue Iso.

  1. Boot into Rescue Mode:

    • Mount the rescue ISO:

      You can search for the Rescue ISO file from the ISOs tab in your VPS control panel, click Mount.

    • Reboot the VPS. Connect to the rescue system via the console function (VNC, Spice) on your VPS panel. Choose the default option in the Boot System Rescue. (Noted: You can not copy and paste in the console session.)

  2. Locate the Root Disk Partition

    • Identify your primary operating system partition. Run: lsblk

    • Look for your main system partition (typically /dev/sda1, /dev/vda1, or an LVM volume like /dev/mapper/...).

  3. Mount the System Partition:

    Create a temporary directory and mount your main filesystem to it:

    mkdir /mnt/sys

    mount /dev/sda1 /mnt/sys

    (Replace /dev/sda1 with your actual partition name).

  4. Mount Virtual Filesystems & Chroot:

    Mount the necessary API filesystems so system commands work properly inside the environment, then change the root directory:

    for dir in /dev /dev/pts /proc /sys /run; do mount --bind $dir /mnt/sys$dir; done

    chroot /mnt/sys

  5. Reset the Password:

    • Run the standard password reset tool inside the chroot environment:

      passwd root

    • Enter your new password twice when prompted.

  6. Handle SELinux (Required for CentOS/RHEL/Rocky/AlmaLinux)

    • Skip this step if using Ubuntu or Debian

    • If your VPS runs an RHEL-based distribution, trigger an automatic filesystem relabel on the next boot:

      touch /.autorelabel

  7. Exit and Unmount

    Exit the chroot shell, unmount the directories cleanly, and reboot:

    exit

    umount -R /mnt/sys

    reboot

  8. Disable Rescue Mode:

    Unmount the Rescue ISO file and reboot your VPS so the VPS boots normally back into the main OS