I really messed up. I rely on an SSH key to access my VPS, but that key was stored on my old PC, which I sold after formatting it a couple of weeks ago. I didn't think to back it up because, let's be honest, who does that? Now I'm wondering if there's any chance I can regain access to my VPS, which is hosted by Hetzner. I plan to email them and admit my mistake, but I'm not too hopeful they'll be able to help. Does anyone have any suggestions?
3 Answers
Definitely check if they have a recovery option or web access. You might be able to utilize their rescue system to regain control of your VPS if you’re locked out.
If it's a VPS, you can use Hetzner's web interface to access a noVNC console. Check out their docs for step-by-step instructions. If your server is physical, they offer a KVM console for free for up to 3 hours.
Do you have access to a web admin panel? You might be able to use a virtual console to get in without the SSH key.
Oh wow, I completely forgot about that! They do have a web console. I can’t believe I didn’t think of it sooner.

And if you don’t have the root password, there’s a rescue system available that you can use to regain access. Just follow the instructions in their documentation.