Ask.Cyberinfrastructure

What is the correct procedure for setting ssh keys up to interface with github and servers outside of the campus cluster?

ssh
github
key-management
git
#1

We have our own small research group small cluster called groupcluster, but we have also begun using the main shared campus cluster. Sometimes we ssh into our groupcluster from the campus cluster, but we also want to use github from the campus cluster.

Yesterday I set up ssh keys for github by placing the private key in my ~/.ssh folder under the name id_rsa. I sent the public key, ~/.ssh/id_rsa.pub to github. Everything worked fine then. Today after logging into the campus cluster when I tried to pull from git I got a “Permission denied (publickey) error.” After viewing the ssh log with the -v option I noticed ssh was using the groupcluster keys so I sent ~/.ssh/groupcluster.pub over to github and now it seems to be working.

The question is this…

What is the correct procedure for setting ssh keys up to interface with github and servers outside of the campus cluster?

#2

I would recommend a separate key pair for every machine you use to connect to Github - that makes it unnecessary to copy private keys between machines. So it sounds to me like you’ve set everything up properly, except it’s a bit odd that your groupcluster key is actually called groupcluster.pub. I would have expected a separate id_rsa and id_rsa.pub on each machine.