Customer Support

  1. Support
  2. VPS
  3. How can I reset or change my VPS root password?
  1. Home
  2. Knowledge Base
  3. VPS
  4. How can I reset or change my VPS root password?

How can I reset or change my VPS root password?

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.

Accessing your VPS management panel

  1. Log in to your Papaki account. 
    Forgot your password? See here how to recover it. 
  1. From the menu on the right, select Active → VPS and choose the VPS you want to manage.

Step 1: Boot into Rescue Mode

  1. Open your VPS management panel.
  2. Under the black console window, click Boot in rescue. In the popup window, leave RescueLinux selected. Confirm the VPS reboot.

Step 2: Access the Rescue Environment

  1. Once the server restarts, it will automatically boot into the SystemRescue environment.
  2. The console prompt will appear as: [root@sysrescue ~]#

Step 3: Locate and mount the disk

Enter the following commands in order, pressing Enter after each one.

  1. Identify the main disk partition

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

  1. Mount the disk to a temporary directory

mount /dev/vda1 /mnt

If your partition has a different name, replace /dev/vda1 accordingly.

  1. Access your VPS operating system

chroot /mnt


Step 4: Change the root password

  1. Run the following command:

passwd root

  1. When prompted with:

New password:

enter the new password and press Enter.

  1. When prompted with:

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.

  1. When you see the message:

password updated successfully

the password has been successfully changed. Exit the chroot environment by typing:

exit


Step 5: Reboot into normal mode

  1. Click the Restart button at the top of the console window. Alternatively, run:

reboot

  1. Once the server finishes rebooting, the normal operating system login screen will appear again.
  1. At the login prompt, enter:

root

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

If the login is successful, the root password has been changed successfully.


Step 6: Enable SSH password authentication

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

  1. Modify the following lines (if they are commented with #, remove the symbol):
    • Change: PasswordAuthentication no to: PasswordAuthentication yes
    • Change (or add): PermitRootLogin yes
  2. Save and exit
    • Press Ctrl + O and then Enter to save.
    • Press Ctrl + X to exit the editor.
  3. Restart the SSH service: systemctl restart ssh

Warning: Enabling PermitRootLogin yes allows direct root access through SSH. For improved security, it is recommended to use a strong password or SSH key authentication.


Step 7: Connect via SSH

From your computer's Terminal or PowerShell, run:

ssh root@[YOUR_VPS_IP]

and enter your new root password when prompted.


You haven't found what you are looking for?

Contact our experts, they will be happy to help!

Contact us