Does JSch allow to understand that I provided wrong credentials?

291 views Asked by At

I am novice with JSch library.
I need to validate login credentials.
How can I make it? connect and check response code?

P.S. I cannot find information in doc.

1

There are 1 answers

0
gstackoverflow On BEST ANSWER
try {
       session.connect();
} catch (JSchException e) {
       if ("Auth fail".equals(e.getMessage())) {
            isSuccess = false; //Auth fail
       }
}