Skip to content
mybox Help Center

Help sections

  • Getting Started
  • Account & Billing
  • Domains & DNS
  • Hosting & Servers
  • Email
  • Security & SSL
  • WordPress & CMS
  • Grow Online
mybox.com All services operational
/

Language

  • English
  • Română
  • mybox panel
  • Webmail
Start free
/
  • Getting Started
  • Account & Billing
  • Domains & DNS
  • Hosting & Servers
  • Email
  • Security & SSL
  • WordPress & CMS
  • Grow Online
  • Help Center
  • mybox.com
  • English
  • Română
All services operational Start free
  1. Help Center
  2. Security & SSL
  3. Account & Password Security
How-to Security & SSL

How to Generate SSH Keys on Windows Using PuTTYgen

Updated June 3, 2026 2 min read
On this page
  1. Step 1: Download and Open PuTTYgen
  2. Step 2: Generate a New Key Pair
  3. Step 3: Protect the Private Key
  4. Step 4: Save the Keys
  5. Save the Public Key
  6. Save the Private Key
  7. Step 5: Add the Public Key to the Server
  8. Using the Private Key with PuTTY
  9. Security Recommendations
  10. Summary

PuTTYgen is a tool included with the PuTTY suite that allows you to generate SSH key pairs for secure authentication when connecting to a server.

An SSH key pair consists of:

  • A private key, which remains on your computer.
  • A public key, which is added to the server.

Step 1: Download and Open PuTTYgen

Download and install PuTTYgen as part of the PuTTY package.

Launch PuTTYgen from the Start menu or installation directory.

Step 2: Generate a New Key Pair

In the PuTTYgen window, click Generate.

While the key is being generated, move your mouse cursor randomly inside the application window. These movements provide the randomness needed to create a secure key.

Once the process is complete, PuTTYgen will display the generated key information.

How to Generate SSH Keys on Windows Using PuTTYgen

Step 3: Protect the Private Key

In the following fields, enter a passphrase:

  • Key passphrase
  • Confirm passphrase

A passphrase helps protect the private key if it is copied or accessed by an unauthorized person.

For better security, use a strong passphrase containing a combination of:

  • Uppercase letters
  • Lowercase letters
  • Numbers
  • Special characters
How to Generate SSH Keys on Windows Using PuTTYgen – 2

Step 4: Save the Keys

After generating the key pair, save both files:

Save the Public Key

Click:

Save public key

Choose a secure location on your computer.

Save the Private Key

Click:

Save private key

Choose a secure location and store the file safely.

Important: Never share your private key with anyone.

How to Generate SSH Keys on Windows Using PuTTYgen – 3

Step 5: Add the Public Key to the Server

Open the public key file or copy the public key displayed in the PuTTYgen window.

Add the key to the following file on the server:

~/.ssh/authorized_keys

The public key must be added on a separate line.

Using the Private Key with PuTTY

When connecting through PuTTY:

  1. Open PuTTY.
  2. Navigate to Connection → SSH → Auth → Credentials.
  3. Select your saved private key file.
  4. Connect to the server normally.

PuTTY will use the private key for authentication.

Security Recommendations

  • Keep your private key in a secure location.
  • Use a passphrase to protect the key.
  • Do not send private keys by email or messaging applications.
  • Remove unused public keys from servers periodically.

Summary

To generate SSH keys on Windows, use PuTTYgen to create a key pair, protect the private key with a passphrase, and save both the public and private keys. The public key should then be added to the server’s ~/.ssh/authorized_keys file to enable SSH key authentication.

Was this article helpful?

Didn't find an answer?

Our support team is here for you 24/7 – write to us and we will help you sort it out.

Helpdesk 24/7 Open a ticket in the mybox panel mybox panel Log in and manage your services

On this page

  1. Step 1: Download and Open PuTTYgen
  2. Step 2: Generate a New Key Pair
  3. Step 3: Protect the Private Key
  4. Step 4: Save the Keys
  5. Save the Public Key
  6. Save the Private Key
  7. Step 5: Add the Public Key to the Server
  8. Using the Private Key with PuTTY
  9. Security Recommendations
  10. Summary

Related articles

All in Account & Password Security
How-to Account & Password Security FTP client – How to take care of security? When using FTP clients to manage your website files, it is important to follow security best practices to protect your hosting account… 2 min read How-to Account & Login Management How do I set up 2FA in the mybox panel? Two-factor authentication (2FA) adds a second verification step when logging in to the mybox panel. After entering your password, the panel asks… 1 min read How-to WebMail mail.mybox.com How do I set up two-step verification in Webmail? Security is a priority today, and two-step verification, which requires not only knowing and providing a password, but also a one-time code,… 2 min read
mybox

Modular web hosting – free out of the box, modular to grow.

Help sections

  • Getting Started
  • Account & Billing
  • Domains & DNS
  • Hosting & Servers
  • Email
  • Security & SSL
  • WordPress & CMS
  • Grow Online

mybox

  • mybox.com
  • mybox panel
  • Webmail
  • Helpdesk 24/7
© 2026 mybox 1,680 articles