Quantcast
Channel: sshnet Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1026

Commented Unassigned: SsHAuthenticationException Unhandelled [1960]

$
0
0
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 **

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
}
```


Viewing all articles
Browse latest Browse all 1026

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>