EDIT: solved I was opening id_ed25519 not id_ed25519.pub.
When I try to paste my SSH key into GitHub > Settings > SSH and GPG keys > New SSH key
, I get the error:
Key is invalid. You must supply a key in OpenSSH public key format
I created the SSH key and added it to the SSH agent successfully as per these instructions in Generating a new SSH key and adding it to the ssh-agent
I found the file and copied the key to my clipboard using these instructions in Adding a new SSH key to your GitHub account
But the text field "Key" in https://github.com/settings/ssh/new says:
Begins with 'ssh-rsa'...
and then gives a whole other variety of ways the key can start.
But mine starts:
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAA
Can anyone help me please? I followed the instructions to the letter. Do I need to add something like 'ssh-rsa' to my key for it to work?
When you create ssh keys you get 2 key's.
One is the public key with "*.pub
" and one private key.
You can read both keys if you open the files.
The private key begins with something like:
----BEGIN OPENSSH PRIVATE KEY-----
The public key starts with the Digital Signature Algorithm it is a one row string
You have to copy the "*.pub" to the git server or on other servers if you work with ssh.
Never give away your private key and use always a password with your keys if someone copy or steal the private key.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With