Re: Error connecting with private key authenticati - WeOnlyDo Discussion board

Re: Error connecting with private key authenticati (General questions)

by bi_dev, Friday, October 24, 2008, 01:22 (5874 days ago) @ woddrazen

hello ,
thanks for the quick response, the code changes did not change the outcome, to i started down the path of using ftpdlx component

here is my code, and i am now getting an error saying 'Failed to import private key', the same key works with other clients, can you see if i am doing something wrong ?


Ssh1.Hostname = TextBox2.Text;
Ssh1.Protocol = Protocols.SFTP;
Ssh1.Port = 22;
Ssh1.Login = TextBox3.Text;
Ssh1.Authentication = Authentications.PublicKey;
WeOnlyDo.Security.Cryptography.KeyManager km = new WeOnlyDo.Security.Cryptography.KeyManager();
WeOnlyDo.Security.Cryptography.SSHKeyTypes type = km.Load(textBox4.Text);
Ssh1.PrivateKey = km.PrivateKey(type);
PrintText( Connecting....
);
Ssh1.Connect();


Complete thread: