The Complete SSH Guide for GitHub: From Beginner to Expert
Quick Start: SSH for GitHub in 5 Minutes What is SSH in Simple Terms? Think of SSH keys like a secure key and lock system for your computer to talk to GitHub: Private Key = Your actual house key (keep it secret!) Public Key = A copy of your lock that you give to GitHub When you connect, GitHub tests your key in their lock - if it fits, you’re in! Step-by-Step Setup (5 minutes) 1. Create Your SSH Key ssh-keygen -t ed25519 -C "your_email@example.com" # Press Enter 3 times (uses default locations, no password) # Creates two files: id_ed25519 (private) and id_ed25519.pub (public) 2. Add Key to SSH Agent # Start the SSH agent eval "$(ssh-agent -s)" # Add your private key ssh-add ~/.ssh/id_ed25519 3. Add Public Key to GitHub # Copy your public key to clipboard cat ~/.ssh/id_ed25519.pub | pbcopy # macOS # OR cat ~/.ssh/id_ed25519.pub | xclip -selection clipboard # Linux Then: ...