Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-1956

Add "keyboard-interactive" option to SFTPTransfer

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0, 0.7.0
    • 1.0.0, 0.7.0, 1.0.0-Beta
    • None
    • None

    Description

      With RFC-4256 some SSH servers may no longer support or enable "password" as a valid authentication option in favor of "keyboard-interactive".
      This results in

      Exception in thread "main" com.jcraft.jsch.JSchException: Auth fail
      

      And even though the spec discusses the authentication mechanism where user will be prompted for a password, JSch provides an authentication provider which handles such prompt behind the scenes as long as user sets password in a session.
      Belo code shows how to reproduce the issue (at least in osx):

      public static void main(String[] args) throws Exception {
              JSch jsch = new JSch();
              Session session = jsch.getSession("<user>", "localhost", 22);
              session.setPassword("<password>");
              Properties properties = new Properties();
              properties.setProperty("StrictHostKeyChecking", "no");
              //properties.setProperty("PreferredAuthentications", "publickey,password,keyboard-interactive");
              properties.setProperty("PreferredAuthentications", "publickey,password");
              session.setConfig(properties);
              session.connect();
              System.out.println("connected");
          }
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ozhurakousky Oleg Zhurakousky
            ozhurakousky Oleg Zhurakousky
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment