Key is invalid. You must supply a key in OpenSSH public key format error message #23464
-
I´ve been working my way through the documentation for connecting with SSH key starting at: However, when I try to add my new SSH key I get the following error message: I´ve read a few earlier posts about this problem, and saw in one of them that the length should be 68 without the email. Mine is 50 characters long without the email. With the email included, it´s 67. The key starts with SHA256 and ends with my email address (with a lot of random signs in between. I´m doing this on an iMac, and I few days ago I did it on my Macbook (and it went smoothly). However, in the meantime I´ve installed the newest version of MacOs on my iMac (Monterey, version 12.0.1). Could this somehow have screwed things up? Any tips would be fantastic! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
jjberg83:
That sounds like you’re trying to use the fingerprint instead of the public key. With OpenSSH the public key should be in a file with a name ending in |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot @airtower-luna ! Made my day 😄 |
Beta Was this translation helpful? Give feedback.
-
-----BEGIN CERTIFICATE----- |
Beta Was this translation helpful? Give feedback.
-
SHA256:wcH95nkL7ZkeRURHpLuoThIBEIIKkYgf9etD18PIx40 |
Beta Was this translation helpful? Give feedback.
That sounds like you’re trying to use the fingerprint instead of the public key. With OpenSSH the public key should be in a file with a name ending in
.pub
, and the content should start withssh-
, followed by the key type (e.g.rsa
ored25519
).