##Using Multiple SSH Keys With Git
Unless specified, Github and other remote repositories will use the default SSH keys, usually at /Users/<you>/.ssh/id_rsa
. The SSH key is associated with the email you entered when you created it, so in order to use a different email/username/ssh key combo for another remote repository, you'll have to do the following:
- Create a new SSH key following the same directions here: https://help.github.com/articles/generating-ssh-keys, but when prompted to enter the file name, name it something like
/Users/<you>/.ssh/id_rsa_somethingelse
instead.
- Look for a file in
~/.ssh/
called 'config'. If it doesn't exist, create one. (No extension).
- Add this to the file and save it:
Host <someremotedomain>