Skip to content
English
  • There are no suggestions because the search field is empty.

Root Password Change/Reset

This article explains how to change the current root user password on a Linux server and how to regain access to the server if the password has been lost.

The root user holds full administrative privileges on a Linux server. For security reasons, we recommend using a strong password and changing it promptly if you suspect it has been compromised.

Depending on whether or not you know your current root password, you can either change it yourself or contact technical support for assistance.

Changing the Root Password

If you know the current root password and wish to change it, follow these steps:

Connect to the server via SSH as the root user, using your current password.

  1. Run the following command:
    passwd
  2. Enter your new password and press Enter.
  3. Re-enter the new password to confirm and press Enter.

    Note! Characters will not be displayed in the terminal while you are typing the password. This is a standard Linux security feature.
  4. Once the password has been successfully changed, the following message will appear in the terminal:
    passwd: password updated successfully
  5. The new password is now set. If SSH password authentication for the root user is enabled on the server, you can use the new password to connect.

Recommendation: Do not close your current SSH session until you have verified that you can successfully connect using the new password.

Resetting the Root Password

For security reasons, it is not possible to reset a lost root password independently through this procedure.

If you have forgotten or lost your current root password, follow these steps:

  1. Submit a ticket to technical support.
  2. Specify the server for which you need to regain access.
  3. Request a root password reset.
  4. Wait for a response from the technical support team and follow the instructions provided.

Security Recommendations for the Root Password

To ensure secure access to your server, follow these recommendations:

  • Use a unique password that is at least 16 characters long.
  • Use a combination of uppercase and lowercase letters, numbers, and special characters.
  • Do not use the same password for different servers.
  • Store your passwords in a secure password manager.
  • Do not share your password with third parties.
  • Change your password if you suspect unauthorized access.
  • Whenever possible, use SSH key-based authentication instead of a password.

What Should You Do if You Can’t Connect to the Server After Changing Your Password?

If you experience issues connecting via SSH after changing the root password, check the following:

Possible cause

Solution

Incorrect password

Ensure the new password has been entered correctly.

Incorrect keyboard layout

Check your input language and the status of the Caps Lock key.

Incorrect connection details

Verify the server's IP address, SSH port, and username (root).

Password-based authentication is disabled

Check your SSH settings or use an SSH key.

Login as the root user is prohibited

Check your SSH configuration via an active administrative session.

Server is unreachable

Check the server's status and your network connection.

If you are unable to resolve the issue on your own, please contact technical support.

If you have any questions, you can ask them in the online chat in the lower-right corner of the site or create a request to the support service through the ticket system.