A plain IOException sent usually means an abnormal condition.
A failed authentication should usually result in no exceptions, but
a AuthFuture#isFailure() to return true or a SshException sent from
AuthFuture#verify().
If the exception you see is an SshException, this means the server rejected
the authentication for some reason.
A simple reason is if password authentication has been disabled (this is
very often the case, even if you log in with a password, it's usually the
interactive authentication which is configured).   If you hit this problem,
I'd suggest moving to the newer authentication mechanism using
   client.addPasswordIdentity(xx);
   client.auth().verify();
which will be easier from a user point of view, as you won't have to deal
with password/interactive stuff.

Cheers,
Guillaume Nodet



2014-10-27 10:18 GMT+01:00 Sapna Bhargava <[email protected]>:

> Hi All,
>
> org.apache.sshd.ClientSession.authPassword() throws an IOException. I need
> to know the cause/scenario of this exception. Could anyone point me to the
> relevant documentation.
>
> reason : I want to put relevant error messages in my application, so that
> the user knows where the issue is.
>
> Thanks,
> Sapna
>

Reply via email to