Skip to content

Instantly share code, notes, and snippets.

@amfischer
Created November 7, 2018 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amfischer/f17db5249ac4970b4daedd8cc827db70 to your computer and use it in GitHub Desktop.
Save amfischer/f17db5249ac4970b4daedd8cc827db70 to your computer and use it in GitHub Desktop.
Multiple SSH Keys Config file
Host frontend[can use any name here] github.com
Hostname github.com
IdentityFile ~/.ssh/eagle-fe_rsa
Host backend[can use any name here] github.com
Hostname github.com
IdentityFile ~/.ssh/eagle-be_rsa
// generate ssh key: ssh-keygen -t rsa -b 4096 -C "your_email@example.com" [any phrase can go in quotes]
// make sure to paste public key into github
// git remote set-url [remote name] git@backend[hostname from config file]:name[repo owner]/repository.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment