Question

I typed in the following code to check the ssh key on my computer:

ssh-keygen -lf ~/.ssh/id_rsa.pub

The key it spits out does not match the key that is present on my github account. How should I proceed to solve this issue? Thanks.

Was it helpful?

Solution

The key it spits out does not match the key that is present on my github accoun

The idea of ssh key is not to reuse a public and private key pair, but to have one for each specific environment from which you are pushing to GitHub.

Once you have generated an id_rsa (private) / id_rsa.pub (public) pair, public the public key on GitHub.

Add ssh key

Test if that works with a:

ssh -T git@github.com
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top