Error connecting with private key authentication - WeOnlyDo Discussion board

Error connecting with private key authentication (General questions)

by bi_dev, Thursday, October 23, 2008, 21:40 (5874 days ago)

Hello All,

I am trying to use the wod .net ssh component, and i am getting following error

unable to connect ATTR_SSH_SECURE_REMOTE_LOGON

I am using the public key sample app that comes with the component.

Also, I can confirm that the server works using the same key when i use the humming bird or sftp client.

has anyone seen this error before ?

Re: Error connecting with private key authenticati

by woddrazen, Thursday, October 23, 2008, 21:47 (5874 days ago) @ bi_dev

Hi Asharma,


I'm not sure that we experience such error in past. Which line in your code produce such problem?

Can you please try this code to connect to server with private key:
http://www.weonlydo.com/index.asp?kb=1&View=entry&EntryID=63

Let us know how it goes.


Regards,
Drazen

Re: Error connecting with private key authenticati

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();

Re: Error connecting with private key authenticati

by woddrazen, Friday, October 24, 2008, 09:08 (5874 days ago) @ bi_dev

Hi,


Which line produce such error? Maybe your private key has password. In that case you should add it also in Load Method line.

Just like in my sample:
[code]dlx1 = new WeOnlyDo.Client.FtpDLX();
key = new WeOnlyDo.Security.Cryptography.KeyManager();

key.Load( c:\private.txt , password );

dlx1.Hostname = your.hostname ;
dlx1.Authentication = WeOnlyDo.Client.Authentications.PublicKey;
dlx1.Protocol = WeOnlyDo.Client.Protocols.SFTP;
dlx1.Login = your.login ;
dlx1.PrivateKey = key.ToXmlString(WeOnlyDo.Security.Cryptography.SSHKeyTypes.RSAKey, true); //(if you are using DSA key, change RSAkey to DSAkey.)
dlx1.Blocking = true;
dlx1.Connect();[/code]

If problem persist, is there any chance you can send us your private key so we can test it on our side? You can send it ti techsupport@weonlydo.com


Drazen

Re: Error connecting with private key authenticati

by Ed Eells , Thursday, May 14, 2009, 14:16 (5671 days ago) @ woddrazen

Hello All,

I am trying to use the wod .net ssh component, and i am getting following error

unable to connect ATTR_SSH_SECURE_REMOTE_LOGON

I am using the public key sample app that comes with the component.

Also, I can confirm that the server works using the same key when i use the humming bird or sftp client.

has anyone seen this error before ?

Re: Error connecting with private key authenticati

by woddrazen, Thursday, May 14, 2009, 15:02 (5671 days ago) @ Ed Eells

Hi Ed,


For some reason we didn't receive your reply. Can you please send it again.


Regards,
Drazen