Our previous post showed you how to set up SSH Key base authentication with Windows 11 without additional software. However, some people prefer to use PuTTY as their SSH client because of its simplicity. If you want to use PuTTY to connect to an SSH server using key authentication with Windows 11, then the steps below will show you how to do that. The steps below will show you how to install, generate SSH key pair, and configure PuTTY to connect to an SSH server without a password. In Ubuntu Linux and other Unix-like systems, generating and managing SSH keys and using key-based authentication is pretty easy. Below is a post that shows you how to create an SSH key pair in Ubuntu Linux and use the public key to authenticate to an SSH server. How to create an SSH key for key authentication To get started with configuring PuTTY in Windows 11 to connect to an SSH server without passwords, continue below.

How to download and install PuTTY on Windows 11

PuTTY is an SSH and telnet client originally developed for the Windows platform. It’s now available on other platforms, including Linux systems. To download and install PuTTY in Windows 11, use the link below. Download PuTTY on Windows 11 Select the 64-bit x86 .msi file and save. By default, in your Downloads folder. In your Downloads folder, double-click the downloaded installer to initiate the installation process. Follow the installer wizard until complete. On the screen below, choose to Add shortcut to PuTTY on the Desktop, then click Install.

How to generate PuTTY SSH Key pair in Windows 11

Before you can generate a PuTTY key pair, you must download PuTTYgen (key generator) app. On the same download page above, scroll down the page and click the puttygen.exe link to download the app. Download puttygen.exe Once the file is downloaded to your Downloads folder, browse and double-click to open the app. When the app opens, click the Generate button, then move the cursor randomly on the Putty Key Generator field window to begin generating the key pair. When you stop the cursor, the process will also stop. So continue moving the cursor until the process is complete. After the keys are generated, add a descriptive Key comment to help you easily identify your key and Save both keys (Public and Private keys) to a secure location. In most cases, you’ll want to save your key pair in your home folder, usually at the path below. Replace with your account name. When saving the private key, you’ll be prompted with a message that you’re saving the private key without a passphrase. Click Yes. Both the public_key and private_key files should be saved at the location specified.

How to copy your public key to the SSH server with Windows 11

Now that you’ve generated your SSH key pair, you will want to copy your public key to the SSH server. On Unix-like systems, ssh-copy-id is a tool for copying SSH keys to the server. However, Windows doesn’t have the ssh-copy-id tool installed. To get your public SSH to the server and enable password-less login, you will have to manually create an authorized_keys file on the remote server and paste the public key into it. On the remote SSH server, in your home directory, create a .ssh folder and an authorized_keys file by running the commands below. Then copy the public key displayed in the PuTTY Key generator app. If you close the app, simply reopen it and load the private key to display its public key. Then paste the content into the file created on the remote SSH server after running the commands above. Save the file and you’re done.

How to configure SSH for passwordless login

Now that you’ve copied over your public key, the next step is to disable password authentication. Log on to the remote server with your password, then open the SSH configuration file by running the commands below. In the file, find the lines below and change the value to match these. Save the file and exit. Restart the SSH server on the remote host. After that, password login should be disabled.

How to configure PuTTY client for password-less authentication with Windows 11

Finally, open the PuTTY client on your Desktop. Next, go to SSH –> Auth, and click the Browse button to browse for your private key (private_key) file saved above. Finally, go to Session, type in the username and host IP or name (ex. username@10.0.2.19), provide a name for the session, and click the Save button. You’ll be able to use the saved session to log in to a remote SSH server without a password. That should do it! Conclusion: This post showed you how to install, generate SSH key pair using PuTTY and configure a key-based authentication with a remote SSH server. If you find any error above or have something to add, please use the comment form below.