What causes this error?
When you paste an SSH key into the Compute dashboard and see “Invalid SSH key,” it usually means:
You pasted the private key instead of the public key
You copied only part of the public key or included extra spaces/line breaks
Your key type isn’t recognized (e.g., an unsupported format)
Step 1 – Verify you’re using the public key
Open your
.ssh
folderFind the file ending in
.pub
(for example,id_ed25519.pub
orid_rsa.pub
).Right‑click the
.pub
file → Open with → Notepad.Select and copy the entire single line, starting with
ssh-ed25519
orssh-rsa
and ending with your email or comment.
Warning: Don’t open or copy the file without .pub
. That’s your private key!
Step 2 – Regenerate your key if needed
If you can’t find a .pub
file or suspect it’s corrupted, create a fresh pair:
ssh-keygen -t ed25519 -C "[email protected]"
Accept the default file location or give it a custom name (e.g.,
id_hivenet
).When prompted, set a passphrase (optional but adds security).
Then repeat Step 1 with the new .pub
file.
Step 3 – Paste carefully into the dashboard
In the Compute dashboard, go to Add SSH key.
Click inside the SSH key field—avoid pasting into any other box.
Paste your copied public key in one go (Ctrl+V).
Click Save or Add key.
Tip: If you see line breaks or extra spaces, click inside the field and use backspace or delete.
Common pitfalls
Hidden newline characters
Some editors add a newline at the end. Make sure the pasted text ends with your key comment, not an empty line.
Wrong key type
Compute supports
ssh-ed25519
andssh-rsa
. ECDSA keys may not work.
Mixing up accounts
If you have multiple keys, verify you copied the one linked to the current Compute account.
Test your key locally (optional)
You can test that your key is valid by connecting to a known host (like GitHub):
ssh -T [email protected]
If GitHub accepts the key, it’s formatted correctly.
Still seeing errors? Use the chat widget on our site or join us on Discord for live help!