Search This Blog

Friday, March 9, 2012

How to use multiple SSH keys

Some times you need to use multiple ssh keys. When the remote hosts are different, this is trivial, but the thing gets complicated when you need to use multiple accounts in the same remote host.

For example, if you have a personal GitHub account and a different one for work, then things can get complicated. To solve this issue, we need to create a SSH config file. In OS X I placed it in ~/.ssh/config. All the details on how to do this for the multiple GitHub account case can be found here.

Note that this method is very general. In fact, but adding other entries to the config file, I now have SSH keys for GitHub, BitBucket, Amazon AWS, etc.


  1. I really enjoyed reading your article. I found this as an informative and interesting post.Thanks for this interesting post.