How to generate SSH keys

How to Generate SSH Keys on Linux, macOS, and Windows

Generate an SSH Key

Follow these steps to create an SSH key on your local machine. If you already have an SSH key, skip to Add Your SSH Key.

Linux & macOS

  1. Open Terminal.

  2. Run the command below, replacing your email:

    ssh-keygen -t ed25519 -C "your_email@example.com"

    This creates a new SSH key with your email as a label.

  3. When prompted to enter a file location, press Enter to use the default path. If an existing key is detected, you can create a custom-named key instead.

  4. Set a secure passphrase when prompted.

Adding Your SSH Key to the ssh-agent (optional)

ssh-agent is a built-in program in Linux and macOS. It is a background process that manages SSH keys and their passphrases, so you don't have to enter the passphrase every time you use SSH.

  1. Start the ssh-agent:

    eval "$(ssh-agent -s)"
  2. If using macOS 10.12.2 or later, update your ~/.ssh/config file:

    touch ~/.ssh/config  
    nano ~/.ssh/config  

    Add the following:

    Host *.zeupiter.com
    AddKeysToAgent yes  
    UseKeychain yes  
    IdentityFile ~/.ssh/id_ed25519  
  3. Add your private key to the ssh-agent:

    ssh-add --apple-use-keychain ~/.ssh/id_ed25519

Windows


Add Your SSH Key to Zeupiter

Last updated

Was this helpful?