Re: Format of ssh private key (General questions)
Marco,
I'm trying to help you - but you have to help yourself too! Read your previous post - you do know how to generate key, and when you save it to a file everything works ok. Am I correct? If you load it from a file, it works ok, right?
So, your problem is that you're trying to put it into mysql. I wish I can help you with that - but I don't have your code, and I don't know how do you put it to mysql. wodKeys cannot write to mysql databases directly, naturally, so you have to do this. And you have to read it later on.
I have suggested you BASE64 encode private key before you write it, and then BASE64 decode after you read it from database, and then pass on to PrivateKeyData property. Have you tried that?
Did you, just for a test, try to
1. Generate key
2. Save to a file 'a.key'
3. store into database
and then
4. retrieve from database
5. save to a file 'b.key'
6. check if 'a.key' and 'b.key' are binary same?
If they mismatch then you have problems with storing keys to a database. If they match then you can skip storing to a file, and pass it to PrivateKeyData directly.
I'm really trying to help you out here with ideas - but I'm not sitting in front of your computer, you have to try these things out.
Best regards,
Kreso
Complete thread:
- Format of ssh private key - Marco, 2004-11-02, 01:26
- Re: Format of ssh private key - wodSupport, 2004-11-02, 01:28
- Re: Format of ssh private key - Marco, 2004-11-02, 10:58
- Re: Format of ssh private key - wodSupport, 2004-11-02, 11:25
- Re: Format of ssh private key - Marco, 2004-11-02, 11:42
- Re: Format of ssh private key - Marco, 2004-11-02, 13:17
- Re: Format of ssh private key - wodSupport, 2004-11-02, 13:22
- Re: Format of ssh private key - Marco, 2004-11-02, 15:17
- Re: Format of ssh private key - wodSupport, 2004-11-02, 15:23
- Re: Format of ssh private key - Marco, 2004-11-02, 15:17
- Re: Format of ssh private key - wodSupport, 2004-11-02, 13:22
- Re: Format of ssh private key - Marco, 2004-11-02, 13:17
- Re: Format of ssh private key - Marco, 2004-11-02, 11:42
- Re: Format of ssh private key - wodSupport, 2004-11-02, 11:25
- Re: Format of ssh private key - Marco, 2004-11-02, 10:58
- Re: Format of ssh private key - wodSupport, 2004-11-02, 01:28