Re: host public key retrival (General questions)
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);
}