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/id_rsa.pub

So, we did this instead:

$cd .ssh

$ vi ~/.ssh/id_rsa.pub

And received the following:

image

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.

image

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

We needed to run:

more id_rsa.pub

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

image

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
MPECS Inc.
Co-Author: SBS 2008 Blueprint Book
Our Web Site
S2D.Rocks!
Our Cloud Service

No comments:

Post a Comment

NOTE: All comments are moderated.