← Back to Notes

SSH Keys Reference

A quick reference for generating and managing SSH keys.

What is an SSH Key?

An SSH key is a matched pair of files used for secure authentication:

  • Private key — stays on your machine, never shared
  • Public key — given to remote servers or services like GitHub

Generate a Key

ssh-keygen -t ed25519 -C "your@email.com"

Add to SSH Agent

eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519

Copy Public Key

cat ~/.ssh/id_ed25519.pub

Test a Connection

ssh -T git@github.com