Announcement: Upgrade to macOS Mojave

With features like Dark Mode, Stacks, and four new built-in apps, macOS Mojave helps you get more out of every click. 
Find out how to upgrade to macOS Mojave > https://support.apple.com/macos/mojave

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Question:

Question: high sierra upgrade breaks ssh keys usage

Before upgrading I could use id_rsa ssh keys without problems. As soon as I upgraded i cannot get my key to work anymore as it complaints about the format.


Load key "/Users/username/.ssh/id_rsa.pub": invalid format

I have read instructions at http://rosslawley.co.uk/key_load_public/

and

https://medium.freecodecamp.org/upgrading-to-macos-sierra-will-break-your-ssh-ke ys-and-lock-you-out-of-your-own-servers-…

So i have regenerated the pub key from my private key

mv ~/.ssh/id_rsa.pub ~/.ssh/id_rsa.pub_old && ssh-keygen -f ~/.ssh/id_rsa -y > ~/.ssh/id_rsa.pub && chmod 600 ~/.ssh/id_rsa.pub

I am still getting the invalid format error. From the article above i read that mac os now also forces 2048 SHA256 so i checked this

$ ssh-keygen -l -f ~/.ssh/id_rsa.pub

2048 SHA256:qESRzqt554JG9vC7eZAQ/ybEe1jReep9vJl7JkwW+D4 no comment (RSA)

and indeed my key is already in this format as you can see above. How do i fix this? Thanks High Sierra :/

MacBook Air, macOS High Sierra (10.13.1)

Posted on

Reply

Page content loaded

Dec 9, 2017 3:00 AM in response to bizmate In response to bizmate

As of the High Sierra 10.13.2 update released in 6th Dec'17, you have to use the id_rsa file that contains the private key and not the id_rsa.pub public key file.


Had the same issue, used the private file instead in ssh command to fix it.


$ ssh -I ~/.ssh/id_rsa.pub remote_server >>> Load key "xxx/.ssh/id_rsa.pub": invalid format

$ ssh -I ~/.ssh/id_rsa remote_server

Dec 9, 2017 3:00 AM

Reply Helpful (3)
User profile for user: bizmate

Question: high sierra upgrade breaks ssh keys usage