Saturday 7 July 2018

GitHub: SSH Key Error: Key is invalid FIX

We're following the GitHub Help instructions for Adding a new SSH key to your GitHub account.

The OS is Ubuntu 16.04 LTS on Azure for a service we're in the process of setting up.

The following _did not work_ for us:

$ clip < ~/.ssh/

So, we did this instead:

$cd .ssh

$ vi ~/.ssh/

And received the following:


Everything looked fine but no matter which way the Copy & Paste was done the Key is invalid. Ensure you've copied the file correctly error would happen.


In the end, the stackoverflow post at the bottom got us some joy.

We needed to run:


Highlight from the last character in the e-mail address to the front of ssh-rsa and it worked!


While it's been a few years since I've worked in a *NIX/*BSD environment it was just like riding a bicycle! Oh, and being somewhat fluent in PowerShell really helps too. :)

Thanks for reading!

Philip Elder
Microsoft High Availability MVP
Co-Author: SBS 2008 Blueprint Book
Our Web Site
Our Cloud Service

No comments: