trevorblackman.dev
← Back to tools

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.

Everything runs in this browser. Your hosts and keys are saved to this browser's local storage so they survive a refresh; project URLs are throwaway and reset on reload. Nothing is ever sent anywhere.
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.

Test the connection
ssh -T git@github.com

Confirms SSH resolves the alias and authenticates with the right key.

Projects on this host

Not saved — paste a repo's browser URL to get a one-shot setup command. Run it inside the already-cloned project.

Copy & run in the project
git remote set-url origin git@github.com:username/repo-name.git
Test the connection
ssh -T git@github-work

Confirms SSH resolves the alias and authenticates with the right key.

Projects on this host

Not saved — paste a repo's browser URL to get a one-shot setup command. Run it inside the already-cloned project.

Copy & run in the 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

~/.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      yes

Paste 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.