Ubuntu Linux Windows

How to Setup PuTTY for SSH Key Authentication on Windows 11

Richard
Written by
Richard
Nov 14, 2021 Updated Apr 14, 2026 3 min read
How to Setup PuTTY for SSH Key Authentication on Windows 11

This guide explains how to set up PuTTY for keys-in-windows-11/" class="sal-link" rel="noopener" target="_blank" data-sal-id="12297">SSH key authentication on Windows 11. Using an SSH key is much safer than using a standard password. It also makes logging in faster and easier.

Why do this? Passwords can be guessed or stolen. SSH keys use a digital lock and key system that is nearly impossible for hackers to break.

What happens when done? You will be able to log in to your remote server automatically using your saved key, without having to type in a password every time.

how to set up

How to create an SSH key for key authentication

How to download and install PuTTY on Windows 11

PuTTY is a popular tool for connecting to remote servers. To get started, download it from the official site using the link below.

Download PuTTY on Windows 11

Choose the 64-bit installer and save it to your Downloads folder.

Download PuTTY installer for Windows 11

Open your Downloads folder and double-click the installer file to begin.

Installing PuTTY on Windows 11

Follow the steps on the screen. When you reach the options page, make sure to select “Add shortcut to PuTTY on the Desktop” and click Install. Note: This step requires admin privileges.

Install button for PuTTY setup on Windows 11

How to generate a PuTTY SSH key pair

Before you can connect, you need a key pair. You will need a tool called PuTTYgen. Download it from the same link you used for PuTTY.

Download puttygen.exe

PuTTYgen download file for key generation

Find the downloaded file in your Downloads folder and open it.

Generating SSH key pair with PuTTY key generator

Click the Generate button. Move your mouse cursor randomly around the empty space in the window. Keep moving it until the green progress bar is full.

Moving cursor for key generation in PuTTY

Once the keys appear, add a comment to identify them. Save both the Public and Private keys in a safe place on your computer.

Saving SSH key pair in PuTTY

It is best to save these in your home folder at this path: C:\Users\username\.ssh (Replace “username” with your actual Windows account name).

Saved SSH key pair location in Windows

When you save the Private Key, you might see a warning about not having a passphrase. Click Yes to proceed.

Saving private key without password in PuTTY

Make sure both files are saved in your chosen folder.

SSH key file saved confirmation in PuTTY

How to copy your public key to the server

Now you must put your public key on the server you want to connect to. Log in to your remote server and run these commands to create a place for the key:

cd ~/

mkdir .ssh

nano ~/.ssh/authorized_keys

Copy your public key from the PuTTYgen app, paste it into the file, and save it.

Copying public SSH key for Windows

Pasting SSH key into Ubuntu terminal

How to turn off password login

To make your server safer, turn off standard password logins. Note: This step requires admin privileges.

On your server, open the configuration file:

🐧Bash / Shell
sudo nano /etc/ssh/sshd_config

Find these lines and make sure they look like this:

💻Code
PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM no

Save the file and restart the SSH service:

🐧Bash / Shell
sudo systemctl restart ssh

How to set up PuTTY for your connection

Open PuTTY on your desktop. Go to SSH and then Auth. Click Browse and select the private key file you saved earlier.

Browsing for private key in PuTTY on Windows 11

Go back to the Session tab. Type your username and server IP address (e.g., [email protected]). Give it a name and click Save.

Creating and saving sessions in PuTTY on Windows 11

You can now use this saved session to log in securely without a password.

Logging in without password using PuTTY on Windows 11

Summary

Setting up PuTTY with SSH keys makes your server connections more secure and faster. By following these steps, you have installed the necessary software, created a secure key pair, updated your server settings, and configured PuTTY for easy, password-free access.

Was this guide helpful?

Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, the owner and lead writer at Geek Rewind, is a tech enthusiast passionate about simplifying complex IT topics. His years of hands-on experience in system administration and enterprise IT operations have honed his ability to provide practical insights and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

2458 articles → Twitter

📚 Related Tutorials

How to Find Your Downloads Folder in Windows 11
Windows How to Find Your Downloads Folder in Windows 11
How to Generate SSH Keys on Windows 11
Windows How to Generate SSH Keys on Windows 11
How to Add or Remove Remote Desktop Users in Windows 11
Windows How to Add or Remove Remote Desktop Users in Windows 11
How to remap keys with PowerToys on Windows 11
Windows How to remap keys with PowerToys on Windows 11

Leave a Reply

Your email address will not be published. Required fields are marked *