Walker News

How To Regenerate Putty-based RSA Public-key From Its Private-key?

We have a server installation checklist but lacking of one for server reinstallation. It could be easily compiled by referring to the installation guide, but none of us bothers to do it.

When the server reinstallation case happened on last few days ago, we drafted a copy in no time. We checked and checked again, to ensure the backup was completed.

However, as what the Murphy’s law stated, “anything that can go wrong will go wrong” – we forgot to backup the Putty-based RSA public key :-(

Was that careless happened because we do not have an approved/certified checklist? If you ask me, I say no and that is why I quote the Murphy’s law in the incident report :-)

Now, missing those putty-based public-key is not something serious, unless we have lost the private key. If happen so, there is no choice to regenerate the new pair of keys.

Using Puttygen to regenerate RSA public-key from its private-key

Putty suite, the Windows-based SSH freeware, contains a key generator called Puttygen to create public-key and private-key.

Puttygen, a.k.a. Putty Key Generator, can also used to regenerate a missing public-key, if

1) the private-key is not missing and valid
2) the passphrase (password) is known

As shown in the following screenshot – open the Puttygen program, click Load button to import private-key.

After the private-key is selected, the Enter Passphrase dialog box pops up. As long as the private-key password is correct, Puttygen is ready for you to save a copy of public-key that based on the given private-key:

Using Puttygen to recreate or regenerate a missing public-key from its private-key.

Therefore, we have no choice to get all affected users to recreate respective public-key with Puttygen and rewarded by some with “lousy sysadmin” :-(

Custom Search

2018  •  Privacy Policy