If you already own an SSH private key but somehow lost your public key, you can regenerate the public key on Windows using PuTTY Key Generator (PuTTYGen).
PuTTYGen is a free utility and is available for Windows. It supports PuTTY Private Key (ppk), PEM, and OpenSSH private key format.
Steps to generate SSH public key from existing private key using PuTTYgen:
Download PuTTY Key Generator
) from the official website and launch the program.
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
Select the location and file name of the public key and click on Save
Discuss the article:
Comment anonymously. Login not required.