Creating KeyPair using wodsftp.net - WeOnlyDo Discussion board

Creating KeyPair using wodsftp.net (wodSFTP / wodSFTP.NET / wodSFTPdll)

by hit_arc, Wednesday, June 04, 2008, 10:50 (6017 days ago)

Hi,

I am using your wodsftp component. I need to generate key pair for connecting to a server.

I am using the following code

String Filename = c:\Keys\secretkey.rsa ;
String Password = secret_password ;
KeyManager km = new KeyManager();
try
{
km.Load(Filename, Password);
}
catch (Exception)
{
km.Generate(SSHKeyTypes.RSAKey);
km.Save(SSHKeyTypes.RSAKey, Filename, Password);
}

But how do i generate public key thorugh this code as i am able to generate and save only private key in this code.

Regards
hit_arc


Complete thread: