Solution to "Cannot parse privateKey: Unsupported key format" in Atom

Home » Guides » Solution to "Cannot parse privateKey: Unsupported key format" in Atom

Solution to "Cannot parse privateKey: Unsupported key format" in Atom

Atom is a powerful code editor, but it can be hard to use private SSH keys because of the limited supported key formats. Here's a guide on how to get around this error message.

When connecting to remote hosts, the most secure method is by using private SSH keys to authenticate.

SSH Key Authentication

First things first; what is SSH key authentication? The SSH key authentication means that you can deactivate the username / password authentication on your server and only rely on actual SSH keys, that you have generated in advance. Without the actual keys, no one can access your server.

Benefits of SSH Key Authentication

The main benefit is that you simply do not use passwords to access your server, which in return means that an intruder cannot gain access simply by bruteforcing the passwords; they need the private SSH key specific for this server.

This is much more secure than other authentication methods, but it can be quite hard to configure. The error message "Cannot parse privateKey: Unsupported key format" is just one of many you may stumble upon when trying to set everything up.

How to Fix "Unsupported Key Format"

So to the main topic at hand; how do we fix the Atom Error Code: Cannot parse privateKey: Unsupported key format error message in the Atom editor?

Turns out, Atom requires the private key to be in the OpenSSH format, and if you get this error message it means that your private key is in the wrong format. So how do we fix it?

Easy — within the application Puttygen, often used for generating private SSH keys, there is a conversion feature that lets you convert the SSH key from one format to another.

Step 1: Download Puttygen

Visit puttygen.com to download the puttygen client.

Step 2: Import your SSH key

Once in the puttygen client; in order to convert your SSH key to OpenSSH format, you need to import it into puttygen. Simply open the Conversions menu, select Import Key and choose your private SSH key you want to convert.

Step 3: Export your new SSH key

When you've imported your current private SSH key, you can export is as OpenSSH by, again, opening the Conversion menu and selecting Export OpenSSH Key (force new file format). This will tell puttygen to write the private key as the OpenSSH format, regardless of the current format.

Done!

You've succesfully created a private SSH key in the OpenSSH format, which can be read and used by the Atom editor without problems.


Details

  • Title: Solution to "Cannot parse privateKey: Unsupported key format" in Atom
  • Published:
  • Author:
  • Categories: SSH Guides
Top Hosting Providers
Price

Want help?

Sometimes it can be hard to make a choice. Have you still not foun the information you're looking for, or are you wondering about something specific? Get in touch and we'll help you out.

Get in touch