Skip to content

Instantly share code, notes, and snippets.

@heyradcode
Last active June 21, 2026 03:25
Show Gist options
  • Select an option

  • Save heyradcode/a8665b297f407e9150085d9b5d0a6e31 to your computer and use it in GitHub Desktop.

Select an option

Save heyradcode/a8665b297f407e9150085d9b5d0a6e31 to your computer and use it in GitHub Desktop.
GitHub SSH Cheat Sheet

🔐 GitHub SSH Cheat Sheet

# Generate SSH key
ssh-keygen -t rsa -C "betterthanbestest@gmail.com"

# Add private key to agent
ssh-add ~/.ssh/id_best

# List loaded keys
ssh-add -l

Register your public key (~/.ssh/id_best.pub) in GitHub.

⚙️ SSH Config Example

# ~/.ssh/config

Host best.github.com
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_best
@heyradcode

heyradcode commented Apr 24, 2026 •

Copy link
Copy Markdown
Author

For windows users who experience this:

C:\Users\Administrator\.ssh>ssh-add id_best
Error connecting to agent: No such file or directory

To fix this, run these in Powershell with Administrator permission:

Get-Service ssh-agent | Set-Service -StartupType Automatic
Start-Service ssh-agent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment