UnderHost
Knowledgebase Docs

How to reset the root password on your VPS

Lost or forgot your VPS root password? Change it yourself with passwd while you can still log in, or open a ticket and the UnderHost NOC resets it for you. Self-service reset in CustomerPanel is coming.

On this page

How you get a new root password depends on one thing: can you still log in to the server in any way (an SSH key, or another user with sudo)? If yes, change it yourself in a minute. If not, our NOC resets it for you through a ticket.

SituationWhat to do
You can still log in (SSH key, or a user with sudo)Change it with passwd
You cannot log in at allOpen a ticket for a reset
Dedicated server or Windows Cloud VPSOpen a ticket: these need a technician

You can still log in: use passwd

Connect over SSH (how to connect) and run:

terminal
# logged in as root (for example with an SSH key)
passwd
# or from a user with sudo rights
sudo passwd root

Type the new password twice. Nothing is shown while you type; that is normal. Use at least 12 characters with letters, numbers and symbols.

You are locked out: open a ticket

  1. Open a ticket from the service

    Log in to customerpanel.ca, go to Services → My Services, open the VPS and choose Open Ticket (or use Support → Open Ticket and select the service).

  2. Ask for a root password reset

    Say which server it is (hostname or IP) and that you need a new root password. Do not put your old password or any other password in the ticket.

  3. Log in and change it

    The NOC sets a new password and replies in the ticket. Log in and change it right away with passwd so only you know it.

Dedicated servers and Windows Cloud VPS

Changing the password on a dedicated server or a Windows server can go wrong without hands-on access (boot settings, RAID, Windows activation), so these resets are always done by a technician through a ticket.

Self-service reset (coming)

A Change Root Password option and a browser console in CustomerPanel are coming to our Cloud VPS platforms, location by location. Until they are available for your server's location, use a ticket; this article will be updated when they are live.

After the reset

  • Store the password in a password manager. See Creating and managing secure passwords.
  • Set up SSH key authentication. With a key in place, a forgotten password never locks you out: you can always log in and run passwd. Then consider disabling password logins (SSH hardening).
  • If you think someone else knew the old password, check /root/.ssh/authorized_keys and the users on the server for anything you did not add.

FAQ

No. Only the password changes. A reinstall is different: it wipes the disk, so never reinstall just to get a new password.
No. CustomerPanel (billing) has its own login. To reset that one, see How to reset your CustomerPanel password. Control panels such as cPanel also have their own passwords.
It depends on the queue and the server. Opening the ticket from the VPS service links it to the right server and avoids back-and-forth.
Never. If anyone asks for your root password in a ticket, email or chat, do not give it. If we need access for a task, we arrange it securely.

Related: How to manage your Cloud VPS | How to connect to your VPS via SSH | SSH key generation | How to open a support ticket

Was this article helpful?

Locked out of your VPS?

Open a ticket from the VPS service in CustomerPanel and ask for a root password reset. We will never ask for your current password.

Related articles

Back to Cloud VPS