SSH is widely used for secure remote access, ensuring data confidentiality and integrity. When the public key is lost or no longer accessible, it can still be obtained from an existing private key without generating a new pair. This approach preserves configurations that rely on the matching public key, avoiding unnecessary changes to remote systems.
PuTTY Key Generator (PuTTYGen) is a free Windows utility designed for SSH key management. It supports private key formats including PuTTY Private Key (PPK), PEM, and OpenSSH, making it a practical tool for recovering missing public keys. Its graphical interface allows users to load an existing private key and retrieve the corresponding public key swiftly.
PuTTYGen helps maintain secure connections and authorized access by letting administrators reuse established credentials. This prevents interruption of workflows that depend on recognized keys, facilitating seamless management of remote sessions and servers.
Steps to generate public key from existing SSH private key using PuTTYgen:
- Download PuTTY Key Generator (puttygen.exe) from the official website.
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
- Launch PuTTYgen.
- Click on the Load button on the lower right of the program.
- Select your private SSH key from where it is locally stored in your system.
PuTTYGen by default filters the file type to just display .ppk format. Click on the select list on the lower right and choose All Files to load files of OpenSSH format.
- Enter the key's passphrase if requested.
- Manually copy the public key displayed on PuTTYGen to a text editor and save it to a file to use in OpenSSH authorized_key file for passwordless login.
- Click on the Save public key button.
- Select the location and file name of the public key and click on Save.

Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
Comment anonymously. Login not required.