top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Getting "JSchException: Auth fail" with correct Username and Password

+2 votes
10,237 views

Why I am getting this error? Please help.

Exception in thread "main" com.jcraft.jsch.JSchException: Auth fail
    at com.jcraft.jsch.Session.connect(Session.java:512)
    at com.jcraft.jsch.Session.connect(Session.java:183)
    at LabManagement.main(LabManagement.java:29)
posted Dec 17, 2013 by Satyabrata Mahapatra

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button
Can you please provide more detail i.e. what is the context what you tried etc...
Both issue are different. I was trying to connect to a remote machine by JSch. But "session.connect()" was throwing exception.

1 Answer

+1 vote

I solved this issue by flushing iPTables(iptables -F). Works for me!!
Trying to figure out Why.

answer Dec 18, 2013 by Satyabrata Mahapatra
This exception occurs whenever jsch.Session.connect fails, most common reason is password is wrong and others could be the obviously connectivity issue.

IPfilters blocks the traffic to the machine based on the settings and flush will clear them all so :)
can you elaborate how do we do that ? flushing table
Similar Questions
0 votes

I was playing with the permissions of

/home
/home/abc

Could someone please tell me the commands to restore the correct permissions to those both directories?

...