 <p>Whats you did id the right way to do it all.</p> <p>Its described here as well: <a href="http://stackoverflow.com/questions/34634132/managing-two-ssh-keys/34634893#34634893">Managing two ssh keys</a></p> <p>Looks like you did not add the keys to your remote server.</p> <hr> <h2>Multiple SSH Keys settings for different github account:</h2> <p><a href="https://gist.github.com/jexchan/2351996" rel="nofollow">https://gist.github.com/jexchan/2351996</a></p> <hr> <h2><strong><em><code>create different public key</code></em></strong></h2> <p>create different ssh key according the article Mac Set-Up Git</p> <pre><code>$ ssh-keygen -t rsa -C "your_email@youremail.com" </code></pre> <p>for example, 2 keys created at:</p> <pre><code>~/.ssh/id_rsa_activehacker ~/.ssh/id_rsa_jexchan </code></pre> <h2><strong><em><code>Add these two keys to the ssh-agent:</code></em></strong></h2> <pre><code>$ ssh-add ~/.ssh/id_rsa_activehacker $ ssh-add ~/.ssh/id_rsa_jexchan you can delete all cached keys before $ ssh-add -D </code></pre> <h2><strong><em><code>check your keys</code></em></strong></h2> <pre><code>$ ssh-add -l </code></pre> <h2><strong><em><code>Modify the ssh config</code></em></strong></h2> <pre><code>$ cd ~/.ssh/ $ touch config $ subl -a config </code></pre> <h3><code>Add the keys to the config file:</code>***</h3> <pre><code>#activehacker account Host github.com-activehacker HostName github.com User git IdentityFile ~/.ssh/id_rsa_activehacker #jexchan account Host github.com-jexchan HostName github.com User git IdentityFile ~/.ssh/id_rsa_jexchan </code></pre> <h2><strong><em><code>Clone you repo and modify your Git config</code></em></strong></h2> <pre><code># clone your repo git clone git@github.com:activehacker/gfs.git gfs_jexchan cd gfs_jexchan and modify git config $ git config user.name "jexchan" $ git config user.email "jexchan@gmail.com" $ git config user.name "activehacker" $ git config user.email "jexlab@gmail.com" # or you can have global git config $ git config --global user.name "jexchan" git config --global user.email "jexchan@gmail.com" </code></pre> <h2><strong><em><code>push your code</code></em></strong></h2> <pre><code>git add . git commit -m "your comments" git push </code></pre>