Closed
Description
key, err := ioutil.ReadFile("/home/rog/.ssh/id_rsa") if err != nil { log.Fatal(err) } _, err = ssh.ParsePrivateKey(key) if err != nil { log.Fatalf("cannot parse ssh private key: %v", err) } ParsePrivateKey fails with an error like this: asn1: structure error: tags don't match (16 vs {class:1 tag:28 length:11 isCompound:true}) {optional:false explicit:false application:false defaultValue:<nil> tag:<nil> stringType:0 set:false omitEmpty:false} pkcs1PrivateKey @2 I'd expect to see an error that complains about the fact that the private key is encrypted.