How to view my entire public key?

I’m coming over from Bitbucket and am wondering, how do I view my public key in its entirety? On Bb, I’m used to being able to go to my Personal Settings > SSH Keys and then clicking on the Edit icon to see the entire key. But here, when I go to my settings for SSH and GPG keys, I see “My Public Key” and a string below it that starts with “SHA256:” but I don’t see my entire public key. The string I see is much shorter and it doesn’t match the contents of my local id_rsa.pub file. There’s also not an option to edit it, only a Delete button. How do I determine if what I’m seeing on GitHub matches what’s in my local public key file? Thanks.

You can verify if the SHA256 hash of your local file matches the listed one (adjust the path to the key file as needed):

ssh-keygen -l -f ~/.ssh/id_rsa.pub

Hi @flaugher ,

in addition to the details provided by airtower above, that allow you to check your keys hash you can query you SSH Key details using the REST api https://api.github.com/user/keys
Details here list-public-ssh-keys-for-the-authenticated-user

Or those of any user using list-public-keys-for-a-user

1 Like