Skip to content

Instantly share code, notes, and snippets.

@Joxebus
Last active January 13, 2021 00:21
Show Gist options
  • Save Joxebus/82a3f4348a7360bb48e823eec45b9f8f to your computer and use it in GitHub Desktop.
Save Joxebus/82a3f4348a7360bb48e823eec45b9f8f to your computer and use it in GitHub Desktop.
This is an example about how to configure different SSH Keys for different services
# ~/.ssh/config
# For any configuration different than defined hosts
Host *
IdentityFile ~/.ssh/id_rsa
User obautista
# Github
Host github.com
HostName github.com
User git
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/personal_rsa
# Custom URL
Host customdomain.com
HostName customdomain.com
User git
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/work_rsa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment