Using keys generated from outside (General questions)
by nprasety, Wednesday, June 03, 2009, 01:03 (5652 days ago)
In the Load method, can I load private key that's generated by other programs? I already have private/public key generated and it's already registered on the host so I'd like to use it rather than creating new pair from WeOnlyDo.
2nd question. Do you support 2048 bit key?
Thanks in advance.
Re: Using keys generated from outside
by wodSupport, Wednesday, June 03, 2009, 01:06 (5652 days ago) @ nprasety
Hi. Answer is 'yes' to both questions. You may need to save your keys by outside program without the password, so it's not encrypted.Once loaded with wodKeys, you can save it from wodKeys *with* the password, so it's protected again.
Hope this helps!
Kreso
Re: Using keys generated from outside
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?
Re: Using keys generated from outside
by woddrazen, Wednesday, June 10, 2009, 19:13 (5644 days ago) @ nprasety
Hi,
Which error did you receive?
Are you able to open that private key using some other tool maybe? Like Puttygen?
Drazen
Re: Using keys generated from outside
by nprasety, Wednesday, June 10, 2009, 21:46 (5644 days ago) @ woddrazen
It doesn't give me error when I tried to Load the private key (it just crashed). It gives me System.Exception: Failed to import key from file. when I tried to Load the publick key.
I'm using F-Secure SSH and I could Import the same key pair (files) using F-Secure Authentication Agent so I assume there's no paraphrase or anything.
Re: Using keys generated from outside
by woddrazen, Wednesday, June 10, 2009, 21:54 (5644 days ago) @ nprasety
Hi,
Is there any chance you can send us some test private key so we can duplicate this on our side?
You can send key to:
techsupport@weonlydo.com
Drazen