sshd_config: disabled PasswordAuthentication and lost private key

3

1

that's only hypothetical question, it hasn't happened to me (yet).

I want to configure secure ssh on my VPS. I'm going to use a public/private key pair (with passphrase) to authentication and I'm also going to set PasswordAuthentication to "no".

The question is: Would I be able to restore access to my VPS via SSH if I lost my private key?

On a desktop it rather wouldn't be a problem, but is it possible on any VPS accessible only via SSH?

dominik

Posted 2011-08-08T17:33:22.443

Reputation: 133

Answers

1

If your VPS has a "out of band console" you will can log in the system like a local user.

Ask your provider for this facility.

Rufo El Magufo

Posted 2011-08-08T17:33:22.443

Reputation: 615

I thought about this workaround and it seems to be the only possible way to achieve this (except for reinstalling vps' OS or at least submitting ticket to a VPS provider) – dominik – 2011-08-08T18:10:32.550

Or change the config file in the panel if you have a VPS+panel installation. You only need write /etc/sshd_config. – Rufo El Magufo – 2011-08-08T19:11:46.950