title: How can I add multiple SSH keys for a Github account and a Bitbucket corporate account
body: <p>I have two different accounts where I have to upload changes to, the thing here is that the GitHub account and the Bitbucket account has different email addresses, so I'm trying to configure multiple ssh keys in order to keep committing, pushing and pulling changes from Github and Bitbucket respectively.</p>
  
  <p>I've tried to generate two different ssh-keys by running:</p>
  
  <pre><code>    ssh-keygen -t rsa -C "My.CorporateAddress@company.com"    
  </code></pre>
  
  <p>Then, when asked to enter the file in which to save the key I add this:</p>
  
  <pre><code>    Enter file in which to save the key (/Users/myUser/.ssh/id_rsa): /Users/myUser/.ssh/id_rsa_github
  </code></pre>
  
  <p>I do the same steps with the bitbucket one.</p>
  
  <p>Then I generate a file named config and edit it by adding:</p>
  
  <pre><code>    Host github
      HostName github.com
      User git
      IdentityFile ~/.ssh/id_rsa_github
  
  
      Host bitbucket
      HostName corporate-address.com
      User git
      IdentityFile ~/.ssh/id_rsa_bitbucket
  </code></pre>
  
  <p>But when I run:</p>
  
  <pre><code>    ssh -T git@bitbucket
  </code></pre>
  
  <p>Or:</p>
  
  <pre><code>    ssh -T git@github
  </code></pre>
  
  <p>And try to make a pull request for any of those, I get the following error:</p>
  
  <pre><code>GITHUB ERROR:
  
  git@github.com: Permission denied (publickey).
  fatal: Could not read from remote repository.
  
  Please make sure you have the correct access rights
  and the repository exists.
  
  ---------------------------------------------------
  ---------------------------------------------------
  BITBUCKET ERROR:
  
  git@bitbucket.corporate.companyName.com: Permission denied (publickey).
  fatal: Could not read from remote repository.
  
  Please make sure you have the correct access rights
  and the repository exists.
  </code></pre>
  
  <p>For security reasons, I omitted the company name.</p>
  
  <p>What I'm trying to achieve is the possibility to work with both, my work Bitbucket account and my Personal Github account which are configured with a different email address.</p>
  
  <p>What am I doing wrong? Your feedback will be truly appreciated it!</p>