← Back to Mission Control

Secure Communications

4 min read

SSH Keys

Mission Phase 11 • Difficulty: Intermediate

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?

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:

Starting the SSH Agent

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

Adding the Key to GitHub

  1. Copy your public key:
cat ~/.ssh/id_ed25519.pub
  1. Go to GitHub → Settings → SSH and GPG keys
  2. Click "New SSH key"
  3. Paste your public key
  4. Give it a title (e.g., "Personal Laptop")
  5. 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:

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.