N
The Daily Insight

How do I generate an SSH key in Windows?

Author

Daniel Lopez

Updated on March 14, 2026

Generating an SSH key

  1. Open the PuTTYgen program.
  2. For Type of key to generate, select SSH-2 RSA.
  3. Click the Generate button.
  4. Move your mouse in the area below the progress bar. ...
  5. Type a passphrase in the Key passphrase field. ...
  6. Click the Save private key button to save the private key.

How do I create a new SSH key?

Generate an SSH Key Pair

  1. Run the ssh-keygen command. You can use the -t option to specify the type of key to create. ...
  2. The command prompts you to enter the path to the file in which you want to save the key. ...
  3. The command prompts you to enter a passphrase. ...
  4. When prompted, enter the passphrase again to confirm it.

Where is the SSH key on Windows?

The public part of the key is saved in the id_rsa. pub file, while the private part is saved in the id_rsa file. Both files can be accessed from this location using Explorer: C:\Users\[your user name]\. ssh .

Where do I get SSH key?

SSH keys are typically configured in an authorized_keys file in . ssh subdirectory in the user's home directory. Typically a system administrator would first create a key using ssh-keygen and then install it as an authorized key on a server using the ssh-copy-id tool.

How do I create a SSH folder in Windows 10?

  1. Generate an SSH key in Windows 10 with OpenSSH Client. Step 1: Verify if OpenSSH Client is Installed. Step 2: Open Command Prompt. Step 3: Use OpenSSH to Generate an SSH Key Pair.
  2. Generate SSH Keys Using PuTTY. Step 1: Install PuTTY. Step 2: Run the PuTTY SSH Key Generator. ...
  3. Using Your SSH Keys.

How to generate ssh keys in Windows Terminal

How do I find my SSH key in Windows 11?

Whether you use Command Prompt or Windows Terminal, type ssh-keygen and hit Enter. This will automatically generate the SSH keys. In our tests on Windows 11, it created a 2048-bit RSA key. If you'd like to use a different algorithm—GitHub recommends Ed25519, for example—then you'd type ssh-keygen -t ed25519 .

How copy SSH public key Windows?

Procedure

  1. In a terminal window, enter the following command: ssh-keygen -t rsa.
  2. Follow the prompts to generate the key. You must provide a file name and a passphrase. A public and a private key are generated. ...
  3. Copy the public key to each node computer, by using the following command: ssh-copy-id username @ node_name.

Which command will generate the SSH encryption keys?

Using this understanding, we can use the ssh-keygen command to generate SSH key pairs using various algorithms and of varying lengths. We can then use these key pairs to authenticate automatically with applications that support SSH.

How do I generate a SSH key in PuTTY?

Generating an SSH key pair using PuTTY

  1. Start PuTTYgen by clicking Start > Programs > PuTTY > PuTTYgen. ...
  2. Click SSH-2 RSA as the type of key to generate. ...
  3. Click Generate and then move the cursor around the blank area of the Key section to generate the random characters that create a unique key.

Where is my PuTTY public key?

The OpenSSH public key is located in the box under Key / Public key for pasting info OpenSSH authorized_keys file: . The public key begins with ssh-rsa followed by a string of characters. Highlight entire public key within the PuTTY Key Generator and copy the text.

How do I generate an SSH key in PowerShell?

Create a SSH key

First launch a PowerShell window. Inside PowerShell, run the ssh-keygen command. The -t parameter tells OpenSSH what type of SSH key should be created.

How do I create a PPK file in Windows?

Generate a ppk file

  1. Download and open PuTTYgen from the PuTTY Download Page.
  2. Click the Load button.
  3. Locate the private SSH key that you have downloaded. ...
  4. Enter the password for your SSH Key.
  5. Click the Save private key button to create the ppk file.

How do I create a private and public key in Windows?

Generating an SSH Key Pair on Windows Using the PuTTYgen Program

  1. Run the PuTTYgen program. ...
  2. Set the Type of key to generate option to SSH-2 RSA.
  3. In the Number of bits in a generated key box, enter 2048.
  4. Click Generate to generate a public/private key pair.

What is SSH key file?

An SSH key is an access credential for the SSH (secure shell) network protocol. This authenticated and encrypted secure network protocol is used for remote communication between machines on an unsecured open network. SSH is used for remote file transfer, network management, and remote operating system access.

What is passphrase for SSH key?

SSH uses private/public key pairs to protect your communication with the server. SSH passphrases protect your private key from being used by someone who doesn't know the passphrase. Without a passphrase, anyone who gains access to your computer has the potential to copy your private key.

Does SSH copy ID work on Windows?

At the moment, Windows 10's implementation of the OpenSSH client does not have the ssh-copy-id command available. However, a PowerShell one-line command can mimic the ssh-copy-id command and allow you to copy an SSH public key generated by the ssh-keygen command to a remote Linux device for passwordless login.

How do I manage SSH keys in Windows?

Logging Windows with SSH Key Under Administrative User

OpenSSH uses special key-based authentication settings for admin user accounts on Windows. You need to use the C:\ProgramData\ssh\administrators_authorized_keys file instead of the authorized_keys key in the user profile.

How do I generate a PPK key from a PEM file?

PEM to PPK conversion steps

  1. Download PuTTYGen from puttygen.com.
  2. Open PuTTYGen and click the Load button.
  3. Set the filetype to *. * so the AWS PEM file is visible.
  4. Select your PEM file and PuTTYGen will import it.
  5. Click Save Private Key and PuTTYGen will convert the PEM to a PPK file.

How do I download a PPK file?

Resolution

  1. Start PuTTYgen. For Actions, choose Load, and then navigate to your . ...
  2. Choose the . ppk file, and then choose Open.
  3. (Optional) For Key passphrase, enter a passphrase. ...
  4. From the menu at the top of the PuTTY Key Generator, choose Conversions, Export OpenSSH Key. ...
  5. Name the file and add the . ...
  6. Choose Save.

How do I convert a text file to PPK?

To use PuTTYgen to convert a key into .
...
ppk format:

  1. Open PuTTYgen, go to Conversions, and then click Import key. ...
  2. Browse to your SSH private key, select the file, and then click Open. ...
  3. Enter the passphrase associated with the private key, and then click OK. ...
  4. Go to File, and then click Save private key to save the key in .

How do I install PuTTY on Windows 10?

Installing Putty on Windows

  1. Step 1: Download the Installer. Download the latest PuTTY version from the official website: ...
  2. Step 2: Configuration and Installation. Double-click the downloaded MSI file to start the installation. ...
  3. Step 3: Run Putty. Run PuTTY after the installation to make sure it functions properly.

Does Windows 10 have SSH?

As noted above, the SSH client is now installed by default in current versions of Windows 10. You can verify that your Windows 10 version has it enabled by opening Windows Settings and navigating to Apps > Optional features and verifying that Open SSH Client is shown.

How do I run SSH on Windows 10?

Here's how:

  1. Press the Search button and type “Optional feature” Click the top result, which should read, “Add an optional feature”.
  2. Click “Add a feature” in Settings.
  3. Install the Windows OpenSSH Client. Type “SSH” in the optional features search bar, then tick the entry that reads “OpenSSH Client”.

How do I setup a SSH server?

Install OpenSSH using Windows Settings

  1. Open Settings, select Apps > Apps & Features, then select Optional Features.
  2. Scan the list to see if the OpenSSH is already installed. If not, at the top of the page, select Add a feature, then: Find OpenSSH Client, then click Install. Find OpenSSH Server, then click Install.

How do I open a PPK file in Windows 10?

Open PuTTY and navigate to Connection > SSH > Auth. Click the Browse button near the Private key file for authentication field. Select the . ppk file you generated and then click Open.