This guide helps you configure SSH on your system to securely connect to your personal GitHub account.
Enable secure and password-less access to GitHub using SSH on a single system.
- Git Bash (Windows) or Terminal (Mac/Linux)
- GitHub account (we're setting up SSH for your personal account)
- Internet access
ls ~/.sshWhy: Ensures no existing SSH keys (like id_ed25519) will be overwritten.
ssh-keygen -t ed25519 -C "your-email@example.com"-t ed25519: Modern, secure key type-C: Adds your email to help identify the key
You'll be prompted:
Enter file in which to save the key (/c/Users/YOURNAME/.ssh/id_ed25519):
π Press Enter to accept the default location.
Then:
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
π Press Enter twice to skip passphrase (recommended for simplicity)
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519Why: Loads your SSH key into memory so Git can use it without prompting.
cat ~/.ssh/id_ed25519.pubπ Copy the full output that starts with ssh-ed25519 and ends with your email.
- Go to GitHub SSH Keys
- Click "New SSH key"
- Add:
- Title: e.g.,
CMS-PC - Key: Paste the key from Step 4
- Title: e.g.,
- Click "Add SSH key"
Why: Tells GitHub that your computer is authorized to access your repositories.
ssh -T git@github.comIf successful, you'll see:
Hi your-username! You've successfully authenticated, but GitHub does not provide shell access.
If prompted:
Are you sure you want to continue connecting (yes/no)?
π Type yes and press Enter
- Go to the repo on GitHub
- Click "Code" β select SSH
- Run:
git clone git@github.com:your-username/your-repo.gitcd your-project-folder
git remote set-url origin git@github.com:your-username/your-repo.gitYou can now push/pull/clone repos from your personal GitHub account using SSH β no username/password required.
- Want to set up a second GitHub (e.g., work/org) account on the same system?
- Need SSH config to manage both accounts at once?
Let us know and continue with the advanced setup guide.