This project is read-only.

Type(s) of key supported

Feb 6, 2012 at 4:48 PM

Which types of private key are supported?

I've written code to create keys in OpenSSH format but creating a PrivateKeyFile using this key throws an exception.

[In case its important, the exception comes from the line

    var version = der.ReadBigInteger();

in Key's constructor]

Are OpenSSH keys supported?  If not, which RSA key formats are supported?


Feb 7, 2012 at 1:38 PM



Currently I support only RSA and DSA key's.

I just dont know how to setup and use other keys on my SSH server.

I guess to resolve this issue I would need to either get a OpenSSH key and see whats wrong.

If you have any test server that I can test against or help me to set up my own that uses OpenSSH key I would take a look at it.




Feb 7, 2012 at 1:50 PM

Thanks for the reply Oleg.

I think my problem was that I was creating invalid RSA keys.  When I generated a key pair using
    ssh-keygen -t rsa
I could create a PrivateKeyFile as expected.

Thanks for the confirmation.  I'll get back to debugging my key writing code now :)


Feb 7, 2012 at 2:06 PM

ok, no problem