PuTTY Key Generator says "Couldn't load private key (not a private key)" when loading a PEM file
BEGIN PRIVATE KEY
marks the PKCS#8 private key format that OpenSSL has started using recently, while PuTTY only expects the 'traditional' / 'PEM' BEGIN RSA PRIVATE KEY
format.
Feed the key through openssl rsa
to convert it to the old format.
Both keys start with MII…
because that's just how an ASN.1 sequence starts, when encoded in Base64, but PKCS#8 additionally has the key type inside, instead of relying on the PEM "BEGIN…" header. You can see the differences using openssl asn1parse
.