Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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.

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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