How to Generate SSH Key Pair


Before you can securely connect to your database or cloud server using SSH, you need a pair of cryptographic keys that verify your identity without using passwords.

 

This guide shows you how to generate your SSH key pair on Windows, macOS, or Linux, so you can safely connect to your infrastructure services such as cloud virtual machines or database servers.




Step 1: Open PowerShell or Terminal


  • Windows: Open PowerShell
    How to open PowerShell
    1. Press the Windows Key
    2. Type: PowerShell
    3. Click Windows PowerShell

 

  • macOS: Open the Terminal app
    How to open Terminal on macOS
    1. Press: Command + Space
    2. Type: Terminal
    3. Open the Terminal app

 

  • Linux: Open the Terminal app
    How to open Terminal on Linux

    Open your system Terminal from the applications menu.




Step 2: Generate SSH Key Pair


  • Inside PowerShell or Terminal, type:
ssh-keygen -t ed25519 -C "Your Identifier"
What is “your-identifier”?

The identifier is simply a name for your SSH key. It helps you remember what this key will be used for in the future.

 

For example:

 

    • infra-access

 

    • database-server

 

    • aws-connection

 

 

 

  • Then press: Enter



Step 3: Choose File Location


You will see:

Enter file in which to save the key:

Press:

Enter

This saves the key in the default secure location.




Step 4: Create a Passphrase


You will now see:

Enter passphrase

This is an optional password that protects your private key if your computer is compromised.

 

  • Enter a passphrase → Recommended

 

  • Press Enter to skip → Less secure

 

You will be asked to confirm it.




Step 5: SSH Keys Created


Your system has now generated:

 

File Purpose
id_ed25519 Your Private Key
id_ed25519.pub Your Public Key

 

They are stored in:

C:\Users\YOUR_USERNAME\.ssh\

 

What does YOUR_USERNAME mean?

 

  • YOUR_USERNAME is a placeholder for the **name of your computer account**. You should replace it with the username you use to log into your machine.

 

For example:

 

  • If your Windows account name is John, the path would be:

 

C:\Users\John\.ssh\



Step 6: Locate Your Private Key


Navigate to:

C:\Users\YOUR_USERNAME\.ssh\

Open the file below with Notepad or VS Code:

id_ed25519

Copy its entire content. You will use this Private Key when creating your SSH Credential in Namirasoft Credential.




Step 7: Locate Your Public Key


  • Open:

id_ed25519.pub