Connection failed

Sep 28, 2012 at 9:46 AM

 

 

 

Hello

 I try to do the following :

SshClient ssh_client= new SshClient

(hostname, username, passwd);

 

ssh_client.Connect();

I obtain exception :

Renci.SshNet.Common.SshAuthenticationException 

In debugger I see incorrect value of password : "password"

instead of my that was passed correctly

Can you help me?

 

Thanks

Alex 

Sep 28, 2012 at 10:07 AM

I'am sorry password is correct, but

var

 

method = this

.AuthenticationMethods.Where((a) => allowedAuthentications.Contains(a.Name)).FirstOrDefault();

 

returns null

Sep 28, 2012 at 10:11 AM

I am work on Windows 7 (.NET 4.0) on target host : OpenSSH_5.2p1, OpenSSL 0.9.8k 25 Mar 2009

Sep 28, 2012 at 12:39 PM
Edited Sep 28, 2012 at 12:39 PM

I am sorry for disturbing problem has been resolved, my remote server support only KeyboardInteractive method, I found in this forum

 

KeyboardInteractiveConnectionInfo connection_info = new KeyboardInteractiveConnectionInfo

 

delegate(object sender, AuthenticationPromptEventArgs

 

foreach (var prompt in

 

if (prompt.Request.Contains("Password"

 

))

 

{

prompt.Response = p_user_password;

}

}

};

e.Prompts)

 

{

 

e)

 

{

 

(p_host_name, 22, p_user_name);

 

connection_info.AuthenticationPrompt +=