DEV Community

Cover image for How to Generate and Use SSH Keys In Windows
Syeda Maham Fahim
Syeda Maham Fahim

Posted on

1

How to Generate and Use SSH Keys In Windows

When working with remote servers, SSH keys are a secure and convenient way to authenticate without repeatedly entering passwords.

PuTTY

PuTTY is one of the most popular tools to generate SSH keys on Windows and connect to servers like AWS or DigitalOcean.

In this guide, I’ll walk you through the steps to install PuTTY, create SSH keys, and set up secure connections with servers. Let’s get started!


1. Installing PuTTY

  • Download PuTTY from its official website.
  • Choose the version that matches your system's configuration (32-bit or 64-bit).

PuTTY

Once downloaded, install PuTTY by following the on-screen instructions.


2. Open PuTTY

  • After installation, search for PuTTY in your system's search bar and open it.

Searchbar

This will open the main PuTTY screen where you can generate SSH keys.


3. Generate an SSH Key

  • Open PuTTYgen, a key generator tool included with PuTTY. You’ll see the following screen:

window popup

  • Click on Generate to start creating your SSH key.
  • You will be asked to move your mouse randomly over the blank space in the PuTTYgen window to generate randomness (entropy) for a secure key.

generate

After the process is complete, you’ll see your SSH key displayed in the window:

SSH key


4. Save Your SSH Keys

  • Copy the public SSH key displayed in the box. This key will be pasted into the server's SSH settings.
  • Click Save private key to store the private key securely on your computer.

Tip: The private key is critical because it can regenerate the public key whenever needed. Make sure to save it in a secure location!


5. Regenerate Public Key from Private Key

If you ever lose your public key, don’t worry! You can easily regenerate it from your saved private key.

  1. Open PuTTYgen again.
  2. Click on Load and select your saved private key file.

Generating public key from private key

Your public key will be displayed again, ready to use.


6. Connect to a Server Using Your SSH Key

Now that your SSH keys are ready, you can use them to connect to remote servers. Simply:

  • Copy the public key to your server's SSH settings (e.g., AWS or DigitalOcean).
  • Use the private key when logging in through PuTTY to authenticate securely.

Final Thoughts

Setting up SSH keys on Windows using PuTTY is straightforward and ensures secure connections to remote servers. Remember these key points:

  • Save your private key securely.
  • Use your public key to set up server authentication.

Stay Connected - @syedamahamfahim 🐬


Image of AssemblyAI tool

Transforming Interviews into Publishable Stories with AssemblyAI

Insightview is a modern web application that streamlines the interview workflow for journalists. By leveraging AssemblyAI's LeMUR and Universal-2 technology, it transforms raw interview recordings into structured, actionable content, dramatically reducing the time from recording to publication.

Key Features:
🎥 Audio/video file upload with real-time preview
🗣️ Advanced transcription with speaker identification
⭐ Automatic highlight extraction of key moments
✍️ AI-powered article draft generation
📤 Export interview's subtitles in VTT format

Read full post

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay