If you have lost your VPS root password or wish to change it for security reasons, you can reset it through the VPS Control Panel using Rescue Mode.



[root@sysrescue ~]#
Enter the following commands in order, pressing Enter after each one.
fdisk -l
A list of available partitions will be displayed. The main partition is usually the one matching the disk size of your VPS package, for example: /dev/vda1

mount /dev/vda1 /mnt
If your partition has a different name, replace /dev/vda1 accordingly.
chroot /mnt
passwd root
New password:
enter the new password and press Enter.
Retype new password:
enter the same password again and press Enter.
Note: For security reasons, no characters or asterisks will appear on the screen while you type your password.
password updated successfully
the password has been successfully changed. Exit the chroot environment by typing:
exit
reboot

root
as the username and then provide the new password you created.

If the login is successful, the root password has been changed successfully.
To connect directly to your VPS from your computer's Terminal or PowerShell without using the web console:
1. Open the SSH configuration file:
nano /etc/ssh/sshd_config
#, remove the symbol):
PasswordAuthentication no to: PasswordAuthentication yesPermitRootLogin yessystemctl restart sshWarning: Enabling PermitRootLogin yes allows direct root access through SSH. For improved security, it is recommended to use a strong password or SSH key authentication.
From your computer's Terminal or PowerShell, run:
ssh root@[YOUR_VPS_IP]
and enter your new root password when prompted.
Contact our experts, they will be happy to help!
Contact us