Skip to content

Instantly share code, notes, and snippets.

@amfischer
Created Nov 7, 2018
Embed
What would you like to do?
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