Generating a new SSH key and adding it to the ssh-agent — by GitHub Docs
Clear walkthrough for creating an Ed25519 SSH key pair, protecting it with a passphrase and loading it into ssh-agent on Linux, macOS and Windows. It is written for GitHub, but the key generation and agent steps apply to logging in to your own servers with keys instead of passwords.
Quick steps
- Generate: ssh-keygen -t ed25519 -C "your_email@example.com" and set a passphrase
- Start the agent: eval "$(ssh-agent -s)"
- Add the key: ssh-add ~/.ssh/id_ed25519
Paraphrased from the source. Menus can differ by version, so check the original for full details.
Source: Generating a new SSH key and adding it to the ssh-agent by GitHub Docs. Licence: Link only (©).
- Source reviewed
- 2026-11-02
- Link checked
- 2026-11-02
- Tested hands-on
- Not by Oddbyte.Me