How to generate a private/public key pair to use for a Linux server on Windows Azure?
Posted
by
MainMa
on Server Fault
See other posts from Server Fault
or by MainMa
Published on 2013-11-10T14:36:49Z
Indexed on
2013/11/10
15:58 UTC
Read the original article
Hit count: 341
Following Windows Azure documentation, I generated a pair of private/public keys on an Ubuntu machine using the exact comment as given:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout myPrivateKey.key -out myCert.pem
When I open the private key in puttygen
, the following error is displayed:
Couldn't load private key (unrecognised key type)
The private key generated by openssl
looks correct:
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG6w0xAQEFAASCBKcwggSjAgEsAoIBAQC6OEZ5ULe6F6u2
Cybhqqfqqh2ao9sd2tpqB+HGIoMMHrmnD3YegRgZJIddTQaWKdwaKrYul21YNt5y
...
P0RyfL9kDnX/XmIOM38FOoucGvO+Zozsbmgmvw6AUhE0sPhkZnlaodAU1OnfaWJz
KpBxkXulBaCJnC8w29dGKng=
-----END PRIVATE KEY-----
Note that the comments to Azure documentation (the same link as above) report that the pair should be generated using OpenSSL for Windows instead of openssl
on Linux. This doesn't help, since the same error appears for a private key generated by OpenSSL for Windows.
What am I doing wrong?
© Server Fault or respective owner