Uploaded image for project: 'MINA SSHD'
  1. MINA SSHD
  2. SSHD-955

API to override "password" key-phrase in prompt for a session via "keyboard-interactive" authentication

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.4.0
    • None

    Description

      mina ssh expects "password" in the prompt.  In UserAuthKeyboardInteractive, 

      protected boolean useCurrentPassword(String password, String name, String instruction, String lang, String[] prompt, boolean[] echo) {
          int num = GenericUtils.length(prompt);
          if (num == 1 && password != null && !echo[0]) {
              String value = GenericUtils.trimToEmpty(prompt[0]).toLowerCase();
              int passPos = value.lastIndexOf("password");
              if (passPos < 0) {
                  return false;
              } else {
                  int sepPos = value.lastIndexOf(58);
                  return sepPos > passPos;
              }
          } else {
              return false;
          }
      }

       

      but the password prompt does not always contain "password".  On Cisco device, the prompt is configurable with

      aaa authentication password-prompt passcode
      

      As the result of this config, when logging into the box, the prompt is "passcode".

      Is there a way to over-ride key-phrase "password" in prompt, for a ssh session?

      Attachments

        Activity

          People

            lgoldstein Lyor Goldstein
            yuefengliu Yuefeng
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: