In my GitHub I want to store my ssh pub key. But GitHub tells me: "Key is already in use". But I have never stored an SSH key for this account. I once gave my pub to a colleague so that he could store it in his GitHub account so that I could check out the project. I currently only have a pub key. I once heard that you can have and manage multiple pub SSH keys.
My two questions:
Can you only store one public SSH key on GitHub? Or can you store the same key per account?
Would the use of multiple pub keys help me here? And is this the common way / the right way?
CodePudding user response:
You can store multiple public keys for a single account.
But you can't use a single public key for multiple accounts, as the private key is used to authenticate your accounts. Therefore, using the same public key on multiple accounts would introduce issues on getting the identity of the user.Yes, you should use a different key pair for each github account. By using a unique key pair for each account, github can authenticate you. Generate a new key pair and add the public key to your github account.