You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the Moment only PKCS#1 RSA keys are supported.
Those begin with -----BEGIN RSA PRIVATE KEY-----
However PKCS#8 Keys are not supported.
Those begin with -----BEGIN PRIVATE KEY-----
I stumbled across this problem when using openssl to generate a key.
By default openssl will write using the PKCS#8 format.
Only if you give it the -traditional flag, it will write in PKCS#1 format.
The error I was getting with PKCS#8 was the following one, because the RegEx that is used to extract the algorithm did not match, because the algorithm is not present in -----BEGIN PRIVATE KEY-----.
Renci.SshNet.Common.SshException: Invalid private key file.
at Renci.SshNet.PrivateKeyFile.Open(Stream privateKey, String passPhrase)
at Renci.SshNet.PrivateKeyFile..ctor(Stream privateKey)
The text was updated successfully, but these errors were encountered:
At the Moment only PKCS#1 RSA keys are supported.
Those begin with
-----BEGIN RSA PRIVATE KEY-----
However PKCS#8 Keys are not supported.
Those begin with
-----BEGIN PRIVATE KEY-----
I stumbled across this problem when using openssl to generate a key.
By default openssl will write using the PKCS#8 format.
Only if you give it the
-traditional
flag, it will write in PKCS#1 format.The error I was getting with PKCS#8 was the following one, because the RegEx that is used to extract the algorithm did not match, because the algorithm is not present in
-----BEGIN PRIVATE KEY-----
.The text was updated successfully, but these errors were encountered: