Skipping Kerberos authentication prompts with JSch
You have a Kerberos/GSSAPI authentication set as the preferred, yet you do not seem to actually use/want it. As you do not specify any username or password for the Kerberos prompts.
This problem can appear spontaneously, when either Kerberos gets installed on the the client PC or the server starts to support Kerberos.
The solution is to remove the Kerberos/GSSAPI (gssapi-with-mic
) from the list of preferred authentication methods in JSch:
session.setConfig(
"PreferredAuthentications", "publickey,keyboard-interactive,password");
Reference: SFTP connection through Java asking for weird authentication.