1

Is it possible to get hold of an RSA private key (pem file) simply by having (root) access to a server that authorizes ssh access using that that private key. For example, can the entries in .ssh/authorized_keys be used to generated the RSA private keys for which they are associated with.

The reason I ask is because I need to disable ssh access to a server with a particular key file. I've edited the authorized_keys file manually and removed the entry associated with that key. That worked and ssh access is no longer possible with that key file, but before I did that, I had created a new private key for ssh access.

I'm concerned that someone with that disabled key file may have been able to acquire the new RSA private key before I was able to delete the old one.

Is that possible?

closed as off-topic by random Sep 9 '15 at 15:31

  • This question does not appear to be about computer software or computer hardware within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

2

For practical purposes: no, it's not possible. More strictly speaking: it's possible, but not feasible. The attacker would need immense computing power or major mathematical breakthroughs.

The entry in your authorized_keys file is a public key. The whole point of public-key cryptography is that your public key can be public because an attacker can't use it to derive your private key.

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