Re: host public key retrival - WeOnlyDo Discussion board

Re: host public key retrival (General questions)

by carsimex, Thursday, October 09, 2008, 20:00 (5888 days ago) @ carsimex

Let me try to answer my own question.
I use public key I got from host to generate my private key that will be used in future communication.
This is the code I am using.

KeyManager km = new KeyManager();
try
{
km.Load(publicKeyPath, keyPassword);
}
catch (Exception)
{
km.Generate(SSHKeyTypes.RSAKey);
km.Save(SSHKeyTypes.RSAKey, path, Password);
}


Complete thread: