Encrypted Transmissions
SSH keys provide secure, password-free authentication between your spacecraft and mission control. They use public-key cryptography—industry standard security.
Why SSH Keys?
- More secure than passwords
- No typing passwords repeatedly
- Required for many Git operations
- Can't be brute-forced
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 New SSH Key
ssh-keygen -t ed25519 -C "your.email@example.com"
Press Enter to accept 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 SSH Agent
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
Adding 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 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(requires password/token) - SSH:
git@github.com:user/repo.git(uses SSH keys)
SSH is more convenient for frequent pushing/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: Transmitting to Space
Your secure communications channel is established. Now let's push your code to GitHub!