Skipping Kerberos authentication prompts with JSch [duplicate]

孤人 提交于 2019-11-26 20:56:29
Martin Prikryl

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.

The solution is to remove the Kerberos/GSSAPI (gssapi-with-mic) from the list of preferred authentication methods:

session.setConfig(
    "PreferredAuthentications", 
    "publickey,keyboard-interactive,password");

Reference: SFTP connection through Java asking for weird authentication.

sauveer

Try adding this:

config.put("PreferredAuthentications","publickey,keyboard-interactive,password");
session.setConfig(config);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!