Hi,
I am creating a C# application that executes Linux command remotely.
Everything is fine with SSH.NET.
But when I enter wrong password it is not giving proper ERROR, just exception un-handed is the message that I am getting, and also "__No suitable authentication method found to complete authentication__."
But i just want to pop-up with a messagbox that re-enter user, something like that how can I overcome this.
Thanks & Regards
Avinash.
Comments: ** Comment from web user: da_rinkes **
I am creating a C# application that executes Linux command remotely.
Everything is fine with SSH.NET.
But when I enter wrong password it is not giving proper ERROR, just exception un-handed is the message that I am getting, and also "__No suitable authentication method found to complete authentication__."
But i just want to pop-up with a messagbox that re-enter user, something like that how can I overcome this.
Thanks & Regards
Avinash.
Comments: ** Comment from web user: da_rinkes **
If I understand you correctly, you can try this:
```
_client = new SshClient(res.host, int.Parse(res.port), res.user, res.password);
try
{
_client.Connect();
}
catch (SshAuthenticationException authexception)
{
// Auth failed, reask credentials
}
catch (Exception exception)
{
// general Error Occured, e.g. host unreachable
}
```