Re: Using keys generated from outside - WeOnlyDo Discussion board

Re: Using keys generated from outside (General questions)

by nprasety, Wednesday, June 10, 2009, 18:43 (5644 days ago) @ wodSupport

Thanks for the response. But I've tried to load the key and it crashes my .NET ssh program. I basically copied the private key from the Linux target (from .ssh2 directory) and the key is something like this:
---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----
Subject: nprasety
Comment: 2048-bit rsa, nprasety@tscivnc02, Thu May 14 2009 14:10:32 -
0700
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCNuWxLhTB5/YyvX012JJ
TpOFpqbNKmEkP+1AvI77Vy2irvoPu5sMjJTY6p6XlWDCT6q/dKuCPuWU0ec914XBccV9VR
...
---- END SSH2 ENCRYPTED PRIVATE KEY ----

I copied and pasted the text into a text file in my development (Windows) and try to load it using Load method and it crashed.

using WeOnlyDo.Security.Cryptography;
WeOnlyDo.Security.Cryptography.KeyManager wodKey;
string KeyFile = c:\id_rsa ;
wodKey.Load(KeyFile);

What did I do wrong?


Complete thread: