github-ssh-keys
Skill0 starsChanged 39 days agoMITView on GitHub
Use when setting up, troubleshooting, or hardening SSH keys for GitHub — FIDO2/U2F hardware keys (ed25519-sk/ecdsa-sk), macOS Keychain integration (UseKeychain, --apple-use-keychain), Windows MSYS2-vs-native-OpenSSH agent confusion, "Bad configuration option: usekeychain" errors, or choosing between ed25519 and rsa-4096
- Reads credentials
- Commits and pushes
In this repository66 other files it gives its agents.
- AGENTS.mdAGENTS.md
- postgres-locking-joinsSkill
- ai-bug-patternsSkill
- compressed-ndjson-boundariesSkill
- http-resume-integritySkill
- linux-io-latency-triageSkill
- macos-disk-space-recoverySkill
- minimal-sufficient-evidenceSkill
- modularize-large-filesSkill
- patch-reproducer-validitySkill
- prompt-cache-boundariesSkill
- proton-drive-selective-backupSkill
- transactional-outbox-deliverySkill
- conventional-commitsSkill
- git-advanced-mergingSkill
- git-bisect-forensicsSkill
- git-data-recoverySkill
- git-hooksSkill
- git-rerereSkill
- git-reset-mechanicsSkill
- git-revisions-syntaxSkill
- git-rewriting-historySkill
- git-submodulesSkill
- git-worktreesSkill
- npm-publish-ci-pitfallsSkill
- sapling-stacked-pr-workflowSkill
- go-concurrency-patternsSkill
- go-data-idiomsSkill
- go-error-handlingSkill
- go-interfaces-embeddingSkill
- go-pprof-profilingSkill
- marketing-funnel-diagnosisSkill
- marketing-geo-experimentsSkill
- marketing-incrementalitySkill
- marketing-positioning-testsSkill
- python-descriptors-mroSkill
- python-logging-cookbookSkill
- python-scaling-regression-testsSkill
- python-unicode-gotchasSkill
- rust-compile-time-invariantsSkill
- rust-deterministic-concurrency-testsSkill
- rust-error-identity-boundariesSkill
- rust-regex-search-contractsSkill
- rust-runtime-bug-classesSkill
- rust-tokio-actor-deliverySkill
- rust-tokio-cancellation-safetySkill
- sales-discovery-qualificationSkill
- sales-mutual-action-plansSkill
- sales-pipeline-forecast-calibrationSkill
- sales-value-negotiationSkill
- ai-triage-evaluationSkill
- container-image-patchingSkill
- dependency-artifact-integritySkill
- dnssec-sentinel-diagnosticsSkill
- iam-policy-change-replaySkill
- rbvm-applicabilitySkill
- rbvm-asset-evidenceSkill
- rbvm-guarded-remediationSkill
- rbvm-priority-decisionsSkill
- rbvm-risk-exceptionsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Prefer Ed25519. GitHub dropped DSA on 2022-03-15.
- Very specific: line 31
Import resident keys onto a new host: ssh-add -K (lowercase K on OpenSSH 8.2+.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitHub SSH Keys
Prefer Ed25519. GitHub dropped DSA on 2022-03-15; RSA keys created after 2021-11-02 must sign with SHA-2 (rsa-sha2-256 / rsa-sha2-512). Fall back to RSA-4096 only when the target genuinely cannot handle Ed25519.
Algorithm choice
| Key type | When |
ed25519 | default; all modern systems |
rsa -b 4096 | legacy servers without Ed25519 |
ed25519-sk | FIDO2/U2F hardware key |
ecdsa-sk | hardware key whose firmware lacks Ed25519 |
The _sk file on disk is a handle, not the key. Physical device lost = key lost.
Generate
ssh-keygen -t ed25519 -C "you@example.com"
ssh-keygen -t ed25519-sk -C "you@example.com" # hardware
ssh-keygen -t ed25519-sk -O resident # store handle on device
ssh-keygen -t ed25519-sk -O verify-required # require PIN/biometric per use
ssh-keygen -t ed25519-sk -O no-touch-required # skip touch (not recommended)Import resident keys onto a new host: ssh-add -K (lowercase K on OpenSSH 8.2+; not the macOS -K).
macOS Keychain
~/.ssh/config:
Host github.com
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519ssh-add --apple-use-keychain ~/.ssh/id_ed25519 # Monterey+
ssh-add -K ~/.ssh/id_ed25519 # pre-MontereyOmit UseKeychain when the key has no passphrase. If a Homebrew/MacPorts ssh-add is first on PATH, --apple-use-keychain breaks — call /usr/bin/ssh-add explicitly, and add IgnoreUnknown UseKeychain to ~/.ssh/config so non-Apple clients don't error on the directive.
Windows
Get-Service ssh-agent | Set-Service -StartupType Manual # elevated, once
Start-Service ssh-agent # elevated
ssh-add C:\Users\you\.ssh\id_ed25519 # unelevatedGit for Windows bundles its own MSYS2 OpenSSH with a separate agent. If ssh-add saved the key but git push still prompts, pin git to the system client:
git config --global core.sshCommand "C:/Windows/System32/OpenSSH/ssh.exe"Pitfalls
- Passphrase-less private keys are plaintext credentials — always set one, let agent/Keychain cache it.
- Agent forwarding (
ForwardAgent yes) exposes every loaded key to the remote host; root there can use them. PreferProxyJumpor a per-host key. - Loaded keys leak by probing: without
IdentitiesOnly yesthe agent tries every key against every server, disclosing public-key fingerprints. - Resident
-skkeys are device-bound: reprovision the hardware token and the public key is irrecoverable — back it up first. - Windows dual OpenSSH: a key added to one agent is invisible to the other.
ssh -vT git@github.comprints which binary runs. - Homebrew
opensshon macOS PATH:ssh-add --apple-use-keychainerrors with "unknown option" — use/usr/bin/ssh-add. - DSA / SHA-1: rejected by GitHub. A pre-2021
ssh-rsaclient negotiating SHA-1 signatures will fail authentication.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

