CentLinux | Learn How to Install CentOS/Rocky Linux Servers

Tuesday, January 1, 2019

PuTTYgen: Configure SSH Keys for Password less Logins to Linux

PuTTYgen: Configure SSH Keys to Password less Logins to Linux

PuTTY is a free and open-source SSH and telnet client. It is primarily developed by Simon Tatham for Microsoft Windows but now it supports a wide variety of other operating systems. Public key authentication is a feature of PuTTY, in which, we can configure SSH Keys to allow password less logins to Linux machines from our PuTTY terminals.

In this article, we are configuring SSH Keys using PuTTYgen and then configure a CentOS 7 machine for password less logins by PuTTY client.


Table of Contents:

PuTTYgen: Configure SSH Keys to Password less Logins to Linux

Environment Specification:

One Microsoft Windows based client and a CentOS 7 based server.


Generate SSH Keys using PuTTYgen:

PuTTYgen is included with PuTTY SSH client. Both are free and open source and distributed under MIT License. Therefore, it is available for free download at PuTTY official website.

We have already installed PuTTY SSH client on our MS Windows client.

Search and run PuTTYgen application.


Click on Generate button to generate a SSH Public/Private keys pair.


Meanwhile, we are required to scroll mouse in the area under the progress bar for randomization and generation of SSH Keys.


PuTTYgen has generated a SSH Public/Private keys pair.

Click on Save private key button to save the SSH Private Key locally.


Since, we are not defining any passphrase, therefore, PuTTYgen is displaying the above warning.

Ignore it and click on Yes.


We have saved our SSH Private Key in a local directory. You can also save your SSH Public Key in the same way, if you plan to use this same SSH Keys pair for more than one Linux machines.


Select the generated SSH Public Key and copy it to clipboard.


Configure SSH Keys for Password Less Logins to CentOS 7:

Connect to our CentOS 7 machine using PuTTY and insert SSH Public Key in ~/.ssh/authorized_keys file.

login as: root
root@'s password:
Last login: Tue Jan  1 18:58:53 2019 from
# mkdir ~/.ssh
# vi ~/.ssh/authorized_keys
# exit

Now, open PuTTY and add a session for that CentOS 7 server.


Besides other settings, we are required to include our SSH Private Key as follows:



Save first and then open this session.

login as: root
Authenticating with public key "rsa-key-20190101"
Last login: Tue Jan  1 18:59:44 2019 from

Our CentOS 7 server won’t prompt for a password this time.

We have successfully configured SSH Keys using PuTTYgen for password less logins to Linux machines.

If you find this article useful? Consider supporting us by Buy Me A Coffee

No comments:

Post a Comment

© 2023 CentLinux. All Rights Reserved.