Encrypted Transmissions
SSH keys provide secure authentication between your spacecraft and mission control without requiring your GitHub account password. They use public-key cryptography, an industry-standard security model.
Why SSH Keys?
- More secure than passwords
- No typing passwords repeatedly
- Convenient for Git operations with remotes
- Resistant to brute-force attacks
Checking for Existing Keys
ls -la ~/.ssh
Look for files like id_rsa.pub or id_ed25519.pub. If they exist, you already have keys!
Generating a New SSH Key
ssh-keygen -t ed25519 -C "your.email@example.com"
Press Enter to accept the default file location. Enter a passphrase (recommended but optional).
This creates two files:
id_ed25519: Private key (keep secret!)id_ed25519.pub: Public key (share with GitHub)
Starting the SSH Agent
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
Adding the Key to GitHub
- Copy your public key:
cat ~/.ssh/id_ed25519.pub
- Go to GitHub → Settings → SSH and GPG keys
- Click "New SSH key"
- Paste your public key
- Give it a title (e.g., "Personal Laptop")
- Click "Add SSH key"
Testing the Connection
ssh -T git@github.com
You should see: "Hi username! You've successfully authenticated..."
HTTPS vs. SSH
Two ways to connect to GitHub:
- HTTPS:
https://github.com/user/repo.git(uses browser sign-in, a credential manager, or a token) - SSH:
git@github.com:user/repo.git(uses SSH keys)
SSH is often more convenient for frequent pushing and pulling.
Security Note
Never share your private key (id_ed25519). Only share the public key (id_ed25519.pub). The private key is like your password—keep it secret!
Next: The Staging Bay
Your secure communications channel is established. Next, head to the staging bay and learn git add—preparing files for commit.