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!
 


SlowCoder

Gold Member
Gold Supporter
Joined
May 2, 2022
Messages
456
Reaction score
313
Credits
3,611
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.
 

Rob

Administrator
Staff member
Joined
Oct 27, 2011
Messages
914
Reaction score
1,728
Credits
1,123
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.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Top