Ivy
  1. Ivy
  2. IVY-1408

Ssh Resolver doesn't work with recent Jsch versions

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.4.0-RC1
    • Component/s: Core
    • Labels:
      None

      Description

      There is a known "issue" with the Jsch library and Java 1.7, in that it prompts for a kerberos username and password (which are then ignored if other credentials have already been supplied). This doesn't stop the Ant ssh tasks from working, but it does stop them from being completely automated (e.g. scripts invoked by a CI server like Jenkins)

      The workaround is either of two:

      1. Move back to Java 1.6
      2. Use old enough Jsch version (0.1.31 seems to be ok).

      Jsch author, Atsuhiko Yamanaka, suggests to configure Jsch Session as following to avoid the issue:

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

      The very same issue was filed and fixed in Ant.

      1. IVY-1408.patch
        2 kB
        Mykhailo Delegan

        Activity

        Hide
        Mykhailo Delegan added a comment -

        Attached the patch which fixes the issue. Patch will also upgrade jsch from 0.1.31 to latest 0.1.49.

        Show
        Mykhailo Delegan added a comment - Attached the patch which fixes the issue. Patch will also upgrade jsch from 0.1.31 to latest 0.1.49.
        Hide
        Maarten Coene added a comment -

        Applied your patch in SVN trunk (but I didn't upgrade the jsch library though).
        Thanks for the contribution!

        Show
        Maarten Coene added a comment - Applied your patch in SVN trunk (but I didn't upgrade the jsch library though). Thanks for the contribution!
        Hide
        Mykhailo Delegan added a comment -

        I'm afraid the patch won't work w/o jsch upgrade, since Session.setConfig(String, String) was introduced in later versions of jsch. I will submit patch which should work w/o jsch upgrade later today.

        You can disregard my comment if patch actually worked out and ivy has been succesfully compiled with it, I just don't know where is CI server hosted to check it.

        Show
        Mykhailo Delegan added a comment - I'm afraid the patch won't work w/o jsch upgrade, since Session.setConfig(String, String) was introduced in later versions of jsch. I will submit patch which should work w/o jsch upgrade later today. You can disregard my comment if patch actually worked out and ivy has been succesfully compiled with it, I just don't know where is CI server hosted to check it.
        Hide
        Maarten Coene added a comment -

        Mykhailo,
        I did already modify your patch to make it work with older versions of jsch
        btw, you can find CI builds of Ivy here: https://builds.apache.org/job/Ivy/

        Show
        Maarten Coene added a comment - Mykhailo, I did already modify your patch to make it work with older versions of jsch btw, you can find CI builds of Ivy here: https://builds.apache.org/job/Ivy/
        Hide
        Mykhailo Delegan added a comment -

        cool, thanks!

        Show
        Mykhailo Delegan added a comment - cool, thanks!

          People

          • Assignee:
            Maarten Coene
            Reporter:
            Mykhailo Delegan
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development