0

I am trying to create a new public key via SSH on GitHub.

> code > SSH > copy > add new public key

The next window is SSH keys / Add new.

I type in a title, then copy and paste the previously copied text. Then here is the problem.

**The copied text does not begin with SSH-RSA OR ECDSA OR SSH-ED OR SK-ECDSA OR SH-SSH which is required to add the SSH key. The only text I can copy from the SSH tab is very short and beginning with [email protected] **

The error message I get having clicked add SSH key - Key is invalid. You must supply a key in OpenSSH public key format

Any help appreciated.

Not sure how to overcome the problem as my colleagues accounts all display SSH-RSA OR ECDSA OR SSH-ED OR SK-ECDSA OR SH-SSH text.

2
  • Hello, This is more of a programming forum, your question is not exactly appropriate. I invite you to look at github's documentation about that docs.github.com/en/authentication/connecting-to-github-with-ssh/… Commented May 22, 2023 at 13:31
  • The error message seems clear enough. Does the copied text start with that? You haven't told us what public key you are pasting. What do you expect us to do about it, other than tell you to use the correct public key, anyway?? Commented May 22, 2023 at 13:36

1 Answer 1

0

This message indicates you should paste your public key with type of key as prefix. For example, let's say the hash of your public key is AAAA.......AAIK0 it should be prefixed by ssh-rsa AAAA.......AAIK0 if your key is rsa or ssh-ed25519 AAAA.......AAIK0 if it is an ed25519 key.

Sign up to request clarification or add additional context in comments.

2 Comments

Where should i find my public key?
in Github you have a link "generating SSH keys", please check this link (docs.github.com/en/authentication/connecting-to-github-with-ssh/…), once done you will have your public key and that's this one you need to paste in your github profile. Github will not generate a key for you you need to do it n your own

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.