You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by Sapna Bhargava <sa...@gmail.com> on 2014/10/27 10:18:58 UTC
ClientSession.authPassword(user, pwd) documentation required
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
Re: ClientSession.authPassword(user, pwd) documentation required
Posted by Guillaume Nodet <gn...@apache.org>.
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 <sa...@gmail.com>:
> 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
>