> ## Documentation Index
> Fetch the complete documentation index at: https://help.onetsolutions.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Change your VPS password

> Generate a new password for your VPS from the console, or turn this option off

If you have lost your VPS password, the console can generate a new one. The change goes through cloud-init, the tool that configures the server when it boots: the console hands it the new password, then reboots the VPS so it applies it.

> [!NOTE]
>
> **Prerequisites**
>
> * A Linux VPS at OnetSolutions (the option does not exist for Windows)
> * A role that can read the instance's credentials (owner or editor)

## Change the password

**1. Open the connection menu**

On your VPS page, click **Connect (SSH)**.

**2. Start the change**

Choose **Change password**, read the warnings, then click **Reboot and change the password**.

**3. Copy the new password**

The VPS reboots, usually in less than a minute. The new password then appears with the IP address and the username: copy it before closing the window.

> [!WARNING]
>
> * The VPS **always reboots**: expect a short interruption of your services.
> * The password is **shown only once**. Store it in a password manager.
> * The change is **not guaranteed**: it works only while cloud-init is still active on the server. If you removed or reconfigured it, or turned the option off (see below), the old password keeps working.

If the change does not go through, you can still connect with an [SSH key](https://help.onetsolutions.net/vps/ssh-keys.md) or through the [KVM console](https://help.onetsolutions.net/vps/kvm-console.md), or [reinstall the system](https://help.onetsolutions.net/vps/operating-system.md).

## Turn this option off

You may prefer that nobody but you can change your server's password, not even from the console.

### At install

When you order or reinstall a VPS, untick **Allow password changes from the console** in the authentication options. The server is then installed with cloud-init set to ignore any password change, and the console's **Change password** entry is greyed out with "Turned off at install". To turn it back on, reinstall the VPS with the box ticked.

### On a server already installed

Log in as root and run:

```bash theme={null}
python3 - <<'PYTHON'
import yaml
config = yaml.safe_load(open("/etc/cloud/cloud.cfg"))
def name(module):
    return (module if isinstance(module, str) else module[0]).replace("_", "-")
stages = ("cloud_init_modules", "cloud_config_modules", "cloud_final_modules")
kept = {stage: [m for m in config[stage] if name(m) != "set-passwords"] for stage in stages if stage in config}
open("/etc/cloud/cloud.cfg.d/99-onetsolutions-password-reset.cfg", "w").write(yaml.safe_dump(kept))
PYTHON
```

This file removes from cloud-init the module that applies passwords. The console still offers the option, but the server ignores it: a requested change reboots the VPS without touching your password.

To allow the change again, delete the file:

```bash theme={null}
rm /etc/cloud/cloud.cfg.d/99-onetsolutions-password-reset.cfg
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.