How to recover a SSH key

ZeroGeass

New Member
Joined
Jun 16, 2022
Messages
11
Reaction score
0
Credits
106
Hello,

So I am following an online course for Linux.

If:
- root login is deactivated
- password login is deactivated
- you can login only with SSH key

What will happen if you lose that SSH key from your computer? How do you get back your access? Are these extreme security measures?

Thank you!
 


Seems to me without password login, your only recourse is authenticating with key. And since you don't have that, you shouldn't be able to connect. So unless you have physical access to the sshd machine, you're out of luck.
 
If this is a VM, you should be able to get a console from the provider's UI and boot into single user mode to get on the machine. Most providers even offer the ability to upload additional SSH keys if needed.

Otherwise, as @SlowCoder stated, physical access to the machine.
 

Staff online

Members online


Top