TritonDataCenter / triton-kubernetes

Kubernetes on Triton
Mozilla Public License 2.0
183 stars 44 forks source link

SSH key error #152

Closed pannon closed 5 years ago

pannon commented 5 years ago

Getting the following error on both OSX and Linux calling the public Joyent CloudAPIs:

Error parsing private key: asn1: structure error: tags don't match (16 vs {class:1 tag:15 length:112 isCompound:true}) {optional:false explicit:false application:false defaultValue:<nil> tag:<nil> stringType:0 timeType:0 set:false omitEmpty:false} pkcs1PrivateKey @2

The same key works against our internal on-prem Triton CloudAPI with triton-kubernetes.

Anyone seen this before, have I missed something obvious?

pannon commented 5 years ago

Managed to track this down to a new SSH key format issue. Keys using the old format have BEGIN RSA PRIVATE KEY in the key file - these keys are working fine.

Keys with the new format BEGIN OPENSSH PRIVATE KEY fail with the asn1 error (above).

Have not spent more time on this, likely related to the Go SSH library.