I generated an SSH key on an Ubuntu VM, and am unable to submit it to my resin account, with the error “Invalid Key” when I submit. Generally, the key files have 3 parts, “ssh-rsa”, the key itself, and the user’s email address. I have tried the key alone, and every possible combination of the key with the other two parts to no avail. I was able to get this to work with a key generated on my Macbook, but not on the Ubuntu VM.
Worked around it by adding my ssh key to GitHub and then importing the key from GitHub - just in case anyone else hits this issue.
Hi @dagrooms52 - that sounds weird. It should be the full .pub file that has to be added. How did you generate the key exactly?
I generated the key using the steps outlined in the GitHub SSH key tutorial, this link: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
I followed them exactly on my Mac and on the Ubuntu VM.
Hi. We’ve created an issue to investigate the problem and fix as needed, will get back to you as soon as it’s done.
Hi, we have a fix for the issue, which just got deployed.
Thank you for your report! Best, Thodoris
Thanks all of you for the quick responses and fix!
I’m having the same issue. Generated at home on Windows using Windows Bash - worked fine. Generated using Windows Bash at work - says invalid key. Importing from GitHub works fine.
I have same issue on Ubuntu. Is it really fixed?
Hi there! How did you generate your key? What’s the error message you 'r getting? Were you able to reproduce this consistently? Could you share your public key as it isn’t sensitive, or add it to a github account, and share your github username?
keys generated with tutorial command:
ssh-keygen -t rsa -b 4096 -C "email@example.com"
And got key as:
I’ve got always “Invalid Key” message when adding it manually. Workaround is to add it in Git and import it from there…
Hi @banto_78, the above public key appears to be invalid. The reason is some added newlines (probably during copy-paste).
For checking your key validity, you can run
ssh-keygen -l -f /path/to/public_key.
You should be able to import the key successfully, after removing the additional newlines from the public key body: