Creating a new Key pair in Windows

Overview

This article describes how to create an SSH key pair on Windows using either PuTTY Key Generator or PowerShell's built-in SSH client. You can then use this when purchasing a new Self-Managed VPS, or to upload to your DreamCompute dashboard.

Background

There are two ways to create an SSH key pair on Windows:

  • PowerShell Windows 10 and later include a built-in SSH client, which allows you to generate a key pair without downloading additional software.
  • PuTTY Key Generator a free SSH client that can be downloaded from the PuTTY website. View the Configure PuTTY article for instructions on a recommended location to save the files on your computer.

The sections below for share instructions for each method.

Creating the key pair using PowerShell

To create a key pair with PowerShell:

  1. Open PowerShell by pressing Windows + R, typing powershell, and pressing Enter.
  2. Run the following command to create the .ssh folder in your user directory if it does not already exist:

    [local]$ mkdir ~/.ssh -Force
  3. Run the following command to generate your ed25519 key pair.

    [local]$ ssh-keygen -t ed25519

    If instead you need an RSA key for compatibility with older systems run:

    [local]$ ssh-keygen -t rsa
  4. When prompted to enter a file location, press Enter to accept the default (e.g. C:\Users\YourUsername\.ssh\id_ed25519), or type a custom path and file name.

    You can also create a subfolder within .ssh to keep multiple keys organized, for example: C:\Users\YourUsername\.ssh\dreamhost\id_ed25519

  5. When prompted for a passphrase, press Enter to skip it, or enter one for added security.
  6. Once complete, two files are saved in the location you specified:
    • id_ed25519 — your private key. Never share this file.
    • id_ed25519.pub — your public key. This is what you will upload to your server.
  7. Open the id_ed25519.pub file to view the public key. You can then copy and paste the text that displays into the panel when purchasing a Self-Managed VPS or configuring a new DreamCompute instance.

Creating the key pair using PuTTYgen

To create a key pair with PuTTYgen:

  1. Navigate to the directory where you saved the puttygen.exe file and open it.

    The PuTTY Key Generator window displays.
  2. On the bottom right, click the Generate button.
  3. Follow the instructions and move your mouse within the blank area to generate random data.
  4. Click the Save public key button at the bottom to save a modified version of the public key.

    Please note that this public key file can not be imported into the DreamCompute dashboard as it is not properly formatted.

  5. Click the Save private key button to save the .ppk (PuTTY Private Key File) file for use with PuTTY later.

    A pop-up displays with the following text:

    Are you sure you want to save this key without a passphrase to protect it?

    Click the Yes button to save without a password.

  6. Copy the text in the box titled Public key for pasting into OpenSSH authorized_keys file:

    It's recommended that you paste this into a blank notepad file on your computer to ensure you have a copy saved. You can then copy and paste the text that displays into the panel when purchasing a Self-Managed VPS or configuring a new DreamCompute instance.

See also

DreamHost links

Third-party links

Did this article answer your questions?

Still not finding what you're looking for?