Lost SSH key on a dedicated server

What to do after you've lost your SSH key to your dedicated server

1. Go to your server

Start by going into Metal, and logging in. Then select your server, by clicking on it's name.

Then go to the Rescue tab.

2. Reset the root password

First, select the Reset Admin Password [1] option, then select the Reset Admin Password [2] option once again.

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.

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

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

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, 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]

Last updated