How could I connect by ssh node to my server?

I tried to connect by “ssh node” to my google compute with private key, but it failed by this error:

ERROR: Cannot parse privateKey: Unsupported key format

I tried to create key by putty keygen (RSA or ED25519)
Could you give me some information for this, please?

For that functionality we use the node library node-ssh. Looking for the error message you posted in their issues this showed up. It links to this page as solution.

A lot of things don’t like the Putty format so it needs to be converted to an OpenSSH format.

Follow the steps here Change Private Key Format to Use with PuTTY to do a conversion and you should be all good.

1 Like

Ok, I just test by exported OpenSSH key by putty keygen simply.
It is ok now, thanks all!

That is OpenSSH type issue.

1 Like

Excellent, Putty has been a pain for me for years and having to guide people through converting their keys is almost a monthly thing for me. That and talking about the dark arts of SSL / TLS certificates :slightly_smiling_face:

Glad you are all sorted :+1:

1 Like