SSH Config Generator
Juggling multiple GitHub accounts, GitLab, or AWS with different SSH keys? Describe each host and key below to generate a ready-to-paste ~/.ssh/config, plus the copy/paste commands that point each project at the right alias and commit identity.
Import an existing ~/.ssh/config›
Paste your current config below. Host, HostName, User, IdentityFile, and IdentitiesOnly are read into cards; comments and other directives are ignored. Commit identity and project URLs aren't part of an SSH config, so add those after importing.
Hosts & keys
Alias matches the real domain, so this key becomes the default for all github.com URLs. Use this for your primary account.
ssh -T git@github.comConfirms SSH resolves the alias and authenticates with the right key.
Not saved — paste a repo's browser URL to get a one-shot setup command. Run it inside the already-cloned project.
git remote set-url origin git@github.com:username/repo-name.gitssh -T git@github-workConfirms SSH resolves the alias and authenticates with the right key.
Not saved — paste a repo's browser URL to get a one-shot setup command. Run it inside the already-cloned project.
git remote set-url origin git@github-work:username/repo-name.git
git config --local user.name "Your Name"
git config --local user.email "work-email@company.com"Full ~/.ssh/config
# ── github.com ────────────────────────────
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/github/keys/id_ed25519
IdentitiesOnly yes
# ── github-work ───────────────────────────
Host github-work
HostName github.com
User git
IdentityFile ~/.ssh/work-github/keys/id_ed25519
IdentitiesOnly yesPaste every block into ~/.ssh/config (create the file if it doesn't exist). On Linux/macOS the file should not be group/world writable: chmod 600 ~/.ssh/config.