# Lost SSH key on a dedicated server

### 1. Go to your server

Start by going into [Metal](https://metal.crunchbits.com/), and logging in. Then select your server, by clicking on it's name.

<figure><img src="https://1565163394-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIm0Oz7ouk4IWkxhVl05c%2Fuploads%2FOqnhaWyRqjQrtI2i27Ry%2FCleanShot%202025-10-31%20at%2019.27.06%402x.png?alt=media&#x26;token=ff7a1ea7-3119-4fab-93e9-cb8a036525ba" alt=""><figcaption></figcaption></figure>

Then go to the `Rescue` tab.

<figure><img src="https://1565163394-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIm0Oz7ouk4IWkxhVl05c%2Fuploads%2FzsJePGMenA2spN64QCDG%2FCleanShot%202025-10-31%20at%2019.27.54%402x.png?alt=media&#x26;token=a1c491e7-c672-460e-8f61-90c8c493a41e" alt=""><figcaption></figcaption></figure>

### 2. Reset the root password

First, select the `Reset Admin Password` \[1] option, then select the `Reset Admin Password` \[2] option once again.&#x20;

<figure><img src="https://1565163394-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIm0Oz7ouk4IWkxhVl05c%2Fuploads%2FpRN0b7iTgJKipgs4d8So%2FCleanShot%202025-10-31%20at%2019.29.18%402x.png?alt=media&#x26;token=be9fe053-fd20-4ceb-ae07-dbfb0e5e4dc7" alt=""><figcaption></figcaption></figure>

Then scroll down to the bottom, and input your new password into the `Set root password` \[1] field, and click `START RESCUE` \[2]. In here, you can also optionally add an SSH key.&#x20;

<figure><img src="https://1565163394-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIm0Oz7ouk4IWkxhVl05c%2Fuploads%2FYiftnVPrG8vAvc6Y59z2%2Fimage.png?alt=media&#x26;token=cd91ed82-e29b-47c9-a88c-43aebd7c1e51" alt=""><figcaption></figcaption></figure>

Then read the warning, and if you agree with these terms click on `START PASSWORD RESET`.

<figure><img src="https://1565163394-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIm0Oz7ouk4IWkxhVl05c%2Fuploads%2F7pT6S6CrLZ09LONDBcyi%2FCleanShot%202025-10-31%20at%2019.32.04%402x.png?alt=media&#x26;token=9c905c4f-21d7-4033-85fd-1f6fe60b057e" alt=""><figcaption></figcaption></figure>

Afterward, wait for it to finish the password reset process.

{% hint style="warning" %}
If it's stuck on `Preparing boot environment` for 10+ minutes, then first please try to restart the server. If that doesn't fix it, please reach out to us via the buttons on the right top.
{% endhint %}

### 3. Add in your new SSH key/enable password root SSH logins

From here, you can console into the server as outlined in [Entering console](https://app.gitbook.com/s/6ozuTxnBVSieoNxQFdfw/server-management/entering-console "mention"), and either directly add in your new SSH key there, or modify your `/etc/ssh/sshd_config` to allow password authentication. \[The variable for this is `PasswordAuthentication`, and it should be set to `Yes`]
