If you can still open a privileged SSH or console session, reset the password immediately with passwd (as root) or sudo passwd (from an account with sudo access). If normal login is unavailable, use your provider’s control-panel reset when available. With a complete lockout, boot the VPS into Rescue Mode, mount the installed system, enter it with chroot, and run passwd root.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
Changing the password and allowing root-password login over SSH are separate settings. Modern Debian and Ubuntu images commonly disable root password authentication by default, so a successful reset may still require the provider console, an SSH key, or an adjustment to the SSH server policy.
As an Amazon Associate I earn from qualifying purchases.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallChoose the safest recovery route
Use the least invasive method that matches the access you still have. A panel reset avoids manual disk mounting; an in-session command is faster when you are already an administrator; Rescue Mode is the recovery path when the installed operating system cannot be reached.
| What you can access | Recommended route | Operational risk | What changes |
|---|---|---|---|
| Root shell or a sudo-capable user | Run passwd or sudo passwd |
Lowest; no disk remounting | The account password in the running system |
| Provider control panel, but no usable SSH login | Use the provider’s password-reset action | Low; the provider handles the recovery environment | Usually the VPS root account password |
| Panel access and Rescue Mode, but no normal login | Mount the system and use chroot |
Moderate; selecting or mounting the wrong partition can damage data | The password database on the installed disk |
| No provider account or console access | Contact the provider or account administrator | Not recoverable locally without an administrative path | Depends on the provider’s identity-verification process |
Reset the password from an existing privileged session
When you are already logged in as root
Run:
passwd
Type the new password, press Enter, type it again when prompted, and wait for the success message. The command changes the password for the account that is currently running it, so a root shell changes root’s password.
#1 Best Overall
- BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
- EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
- COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
- LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
- WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
When you have a sudo-capable account
Ubuntu’s normal installer user is usually placed in the sudo group. From that account, run:
sudo passwd
Enter your current sudo password if requested, then enter and confirm the new root password. Ubuntu documents this as the standard way to set root’s password from the initial administrative user.
Recommended Free Tools
Reset another account instead of root
If the account that is locked out is not root, specify its name:
sudo passwd username
Replace username with the real Linux account name. Do not use a placeholder literally.
Lock root again on Ubuntu
If you only needed temporary recovery and want Ubuntu’s root account locked afterward, run:
sudo passwd -l root
Locking the password does not remove your sudo access or SSH keys. Verify that another administrative path works before ending your current session.
Free tools Windows power users keep installed
One-click scans. No signup required.
Use the provider’s control-panel reset
Many VPS consoles provide a reset action that writes a new root password without requiring you to identify partitions manually. Prefer this route when it is available. Victus Cloud describes a panel-based reset, and Hetzner labels its action Reset Root Password in the cloud console.
- Sign in to the provider account that owns the VPS.
- Open the specific server or VPS details page.
- Find the password, recovery, or emergency-access section.
- Choose the provider’s root-password reset action. On Hetzner, the label is Reset Root Password.
- Read the warning about rebooting or replacing credentials, then confirm.
- Save the generated password in a secure password manager or enter a strong replacement if the panel permits it.
- Connect through the provider console first if SSH authentication is still uncertain.
The panel route is less error-prone than manually mounting a disk because the provider knows the VPS storage layout and performs the reset in its own recovery workflow. The exact labels, reboot behavior, and whether a one-time password is shown vary by provider.
Prepare before using Rescue Mode
Rescue Mode is powerful because it runs a separate recovery image while your installed system is offline. It also introduces the greatest chance of operating on the wrong disk. IONOS explicitly warns that incorrect steps can cause data loss and requires a backup before resetting the root password.
Rank #2
- WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
- AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
- PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
- ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
- COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
- Create a provider snapshot or another verified backup before changing mounts.
- Record the VPS name, region, IP address, and the normal boot disk if your provider exposes them.
- Confirm that you can open the provider’s emergency console or rescue SSH endpoint.
- Read the provider’s instructions for activating and deactivating Rescue Mode; some providers reboot automatically.
- Keep a tested SSH key or sudo-capable account available. A new root password does not necessarily enable root-password SSH login.
“These instructions list steps that can lead to data loss if performed incorrectly. Therefore, always create a backup before resetting the root password.” — IONOS help documentation
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Reset root from a provider rescue image
The following sequence is provider-neutral. Device names are examples only. Your VPS may use /dev/sda1, /dev/vda1, /dev/xvdb1, or another path. Never substitute an example without checking the rescue environment.
1. Activate Rescue Mode and connect
Activate Rescue Mode or the provider’s recovery image in the control panel. Connect through the emergency console or the rescue SSH credentials supplied by the provider. You are operating in the rescue system, not in the installed VPS environment.
2. Identify the installed root partition
List disks and filesystems:
lsblk
Use filesystem labels and types for more detail:
lsblk -f
Look for the partition containing the installed Linux filesystem. Do not assume that the first disk or a familiar name is correct. If the output shows several Linux partitions, use the provider’s storage layout and mount candidates read-only when necessary to inspect their contents before making changes.
3. Mount the installed root filesystem
Create a mount point if the rescue image does not already provide one:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
mkdir -p /mnt
Mount the partition you verified. This example uses /dev/sda1:
mount /dev/sda1 /mnt
Replace /dev/sda1 with the partition identified by lsblk. A successful mount should expose directories such as /etc, /var, /home, and /usr beneath /mnt.
4. Bind-mount virtual filesystems
The installed system needs access to device, process, and kernel interfaces while the password command runs. A portable pattern is:
for d in dev proc sys; do mount --bind /$d /mnt/$d; done
Some rescue procedures also bind the pseudo-terminal filesystem explicitly:
Rank #3
- Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
- Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
- Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
- ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
- Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
mount --bind /dev/pts /mnt/dev/pts
If the target directories do not exist, create them inside the mounted filesystem before binding:
mkdir -p /mnt/dev/pts /mnt/proc /mnt/sys
Follow your provider’s documented mount order when it differs from this pattern. The /dev/pts bind must occur after /dev has been mounted.
5. Enter the installed system with chroot
Change the apparent root directory from the rescue image to the mounted VPS:
chroot /mnt
Commands now operate on the installed system’s files. You can confirm the context with:
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorswhoami
The rescue shell may already be root, so whoami should report root. The important distinction is that the password files being edited are now those on the mounted VPS.
6. Set the root password
Run:
passwd root
Enter the new password twice. To reset a different local account, use:
passwd username
A successful completion message confirms that the password database on the installed disk was updated.
7. Schedule an SELinux relabel when required
AlmaLinux, Rocky Linux, CentOS Stream, and Fedora images can require SELinux security contexts to be restored after offline changes. If the provider’s rescue documentation calls for it, create the relabel marker while still inside the chroot:
touch /.autorelabel
The marker tells the next normal boot to relabel filesystems. Do not add it blindly to every distribution; use it for SELinux-enabled images where the recovery procedure requires it.
Rank #4
- Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
- Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
- 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
- Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
- USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
8. Exit and unmount cleanly
Leave the installed system:
exit
Unmount the bind mounts in reverse order, then unmount the root filesystem:
umount /mnt/dev/pts
umount /mnt/dev
umount /mnt/proc
umount /mnt/sys
umount /mnt
If a mount reports that it is busy, check that no shell has its working directory under /mnt and that you have exited the chroot. Use the provider’s documented cleanup command if it supplies one rather than forcing an unmount.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →9. Disable Rescue Mode and reboot
Deactivate Rescue Mode in the provider panel and reboot into the normal disk. Some providers require the reboot from the panel; others allow it from the emergency console. Wait for the normal operating system to return before testing the new credentials.
Distribution-specific recovery paths
Ubuntu
Ubuntu normally gives the initial installer user sudo access. From a working session, sudo passwd sets the root password and sudo passwd -l root locks it again. Ubuntu images may still reject root-password SSH login because the image’s SSH policy favors keys and sudo.
Debian and Ubuntu in provider Rescue Mode
IONOS and Gandi’s documented rescue procedures use the same core sequence: identify the partition, mount it, bind the virtual filesystems, enter with chroot, run passwd root, leave the chroot, unmount, disable recovery mode, and reboot. The exact device path and console controls differ between providers.
RHEL-family systems with a bootloader emergency shell
When a provider rescue image is unavailable, Red Hat documents a bootloader recovery pattern using the rd.break kernel parameter. At the emergency shell, the installed root is commonly mounted read-only under /sysroot. The recovery sequence is:
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →mount -o remount,rw /sysroot
chroot /sysroot
passwd
touch /.autorelabel
exit
exit
The first exit leaves the chroot and the second returns from the emergency shell so boot can continue. The relabel step is for SELinux-enabled installations. Bootloader menus and mount paths vary, so use the version-specific Red Hat procedure or your provider’s instructions if the shell presents a different layout.
Why SSH can still reject the new password
A password reset changes the account credential; it does not override the SSH daemon’s authentication policy. Hetzner notes that newer operating systems such as Debian 11 and Ubuntu 22.04 disabled root password authentication by default because of brute-force risk.
If the new password works in the provider console but not over SSH, check these separate controls:
Best Value
- Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
- Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
- Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
- Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
- Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
- Root-login policy: inspect the SSH server’s
PermitRootLoginsetting and any included configuration files. - Password authentication: check whether
PasswordAuthenticationis disabled. - Firewall and network rules: confirm that the SSH port is reachable from your current network and that a host firewall is not blocking it.
- Image design: some VPS images expect you to log in as a non-root user with an SSH key and then use sudo.
- Account state: make sure you changed the intended account and did not accidentally reset a similarly named user.
Do not disable key-based access or sudo access while troubleshooting. First prove that an alternative administrative path works, preferably through the provider console or a second SSH session.
Security steps after recovery
Use a strong credential temporarily or permanently
Root is exposed to the internet when SSH is reachable, especially on the standard port 22. Victus Cloud recommends a long random passphrase or, preferably, disabling password login entirely in favor of an SSH key.
Prefer keys and a sudo user for routine administration
After testing a key-based login as your normal administrative user, use sudo for privileged commands and keep direct root SSH access disabled where your operating system policy supports that arrangement. Make the change only after opening a second session and confirming that the key works.
Keep an emergency path documented
Record the provider console location, Rescue Mode activation steps, snapshot procedure, and the name of the sudo-capable account. Store recovery details in a password manager rather than in shell history or an unencrypted note on the VPS.
Troubleshooting the reset
The password command changed the wrong system
This happens when passwd is run in the rescue image without mounting and entering the installed filesystem. Repeat the process, verify that /mnt/etc exists after mounting, run chroot /mnt, and then execute passwd root.
The expected root partition is not present
Run lsblk -f again and compare filesystem sizes, labels, and mount points with the provider’s storage information. Device names can change between normal and rescue boots. Do not format, repair, or delete a partition merely because its name differs from an example.
chroot fails or passwd cannot update the account
Check that the root filesystem is mounted read-write and that /etc is present beneath the chroot directory. Recheck the bind mounts for /dev, /proc, and /sys, then retry. If the provider supplies a required chroot-preparation command, use that command instead of the generic sequence.
The VPS does not boot after an SELinux reset
On an SELinux-enabled image, the recovery procedure may require /.autorelabel. Boot through the provider console so you can see relabel progress and any error message. Do not repeatedly reset passwords or change SSH settings until the operating system has completed its first normal boot.
The new password works in the console but SSH still fails
Treat this as an SSH-policy or network issue, not as proof that the reset failed. Use the console to inspect root-login and password-authentication settings, verify firewall rules, and test the intended sudo user with its SSH key.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Quick Recap
What to remember
- Use the provider panel reset when available; it avoids manual partition work.
- In Rescue Mode, identify the root partition with
lsblkorlsblk -finstead of assuming/dev/sda1or/dev/vda1. chrootis what makespasswd rootmodify the installed VPS rather than the temporary rescue image.- Create a backup first, then exit and unmount cleanly before rebooting.
- A changed password does not automatically enable root-password authentication over SSH.
- Use
/.autorelabelonly when the SELinux recovery instructions for the image require it.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




