Bug 53437

Summary: ssh tasks prompt for kerberos username/password under Java 7
Product: Ant Reporter: Chris Nappin <chris.nappin>
Component: Optional TasksAssignee: Ant Notifications List <notifications>
Status: RESOLVED FIXED    
Severity: major    
Priority: P2    
Version: 1.8.1   
Target Milestone: 1.9.0   
Hardware: PC   
OS: All   

Description Chris Nappin 2012-06-19 15:52:19 UTC
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 only work around I can find is to move back to Java 1.6 or earlier. The issue exists with Jsch 0.1.47 and 0.1.48.

The Jsch author's suggested work around is to add the following to your client code when establishing the Jsch channel session:

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

Please can this code be added to the Ant ssh tasks?
Comment 1 Stefan Bodewig 2012-06-20 04:21:57 UTC
Is there any pointer to the recommendation?  Is this anything ymnk plans to fix in future JSch releases or does he consider it a JDK problem?

TBH I'd expect JSch to release a new version sonner than Ant would, so if JSch gets fixed there'd be no reason to add a workaround to Ant.
Comment 2 Kabron Kline 2012-12-17 15:01:50 UTC
Any update on this? I can confirm it's still occurring using Ant 1.8.4 with Jsch 0.1.49 on Java 1.7.0.09

For now I'm relying on Java 1.6 to make my scripts work properly.
Comment 3 Antoine Levy-Lambert 2013-01-06 21:11:49 UTC
I found a pointer to the recommendation of Atsuhiko Yamanaka here : http://sourceforge.net/mailarchive/message.php?msg_id=29359265
Comment 4 Antoine Levy-Lambert 2013-01-06 21:48:26 UTC
fixed with http://svn.apache.org/viewvc?rev=1429602&view=rev