2

What happens if you set up a server or VM and put your ssh keys on there, then you disable password authentication. Then, you somehow lose your private key and can no longer authentication to the machine with a key. How does one access the machine?

2

You'd have to access it physically (IE with a keyboard) and change sshd_config to allow password login, before changing the key stored on the server.

  • So if this was in xen/kvm or a similar hypervisor, it would involve bringing up a console and logging in via password to a server account? – Peter Dec 22 '12 at 23:21
  • 1
    Exactly; if it's a self-hosted VM then that's what you'll have to do, some VPS providers and cloud VM hosting services may have their own automated way to do this though. With Amazon EC2, for example, I'm pretty sure you can upload a new public key from the web interface. – jackweirdy Dec 23 '12 at 0:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.