Skip to content

Instantly share code, notes, and snippets.

@chipcerio
Created May 27, 2019 04:41
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 chipcerio/7a1219035fc89c2f27d37347f7ea6ef6 to your computer and use it in GitHub Desktop.
Save chipcerio/7a1219035fc89c2f27d37347f7ea6ef6 to your computer and use it in GitHub Desktop.
ssh configuration for multiple profile
# personal Bitbucket
Host bitbucket.org
User git
Hostname bitbucket.org
AddKeysToAgent yes
UseKeychain yes
PreferredAuthentications publickey
IdentitiesOnly yes
IdentityFile ~/.ssh/id_rsa
# company 1 uses Bitbucket
Host bitbucket-company1
User git
Hostname bitbucket.org
AddKeysToAgent yes
UseKeychain yes
PreferredAuthentications publickey
IdentitiesOnly yes
IdentityFile ~/.ssh/company1_id_rsa
# personal Github
Host github.com
User git
Hostname github.com
AddKeysToAgent yes
UseKeychain yes
PreferredAuthentications publickey
IdentitiesOnly yes
IdentityFile ~/.ssh/id_rsa
# company 2 uses Github
Host github-company2
User git
Hostname github.com
AddKeysToAgent yes
UseKeychain yes
PreferredAuthentications publickey
IdentitiesOnly yes
IdentityFile ~/.ssh/company2_id_rsa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment