# ssh-keygen

*noun*

say it: **“ES-es-ESH KEE-jen”** **/ˌɛsɛsˈeɪtʃ ˈkidʒɛn/**

The command that makes a new SSH key pair: a private key and the public key that goes with it.

## What does **ssh-keygen** do?

`ssh-keygen` makes a new SSH key pair: a private key that stays on your computer and a public key, the same name with `.pub`, to put on servers. It asks for a passphrase to lock the private key. Answer `n` if it asks to overwrite a key you already use.

```bash
ssh-keygen -t ed25519 -C "sam@laptop" -f practice_key
# Your identification has been saved in practice_key
# Your public key has been saved in practice_key.pub
```

## In a sentence

- “Sam ran **ssh-keygen** once and used the key for every server.”
- “**ssh-keygen** asked for a passphrase to lock the private key.”

Level: Journeyman · [More Unix terms at this level](https://www.ask-codey.com/glossary?category=unix&level=3)

Updated: November 10, 2026

Source: https://www.ask-codey.com/glossary/ssh-keygen
