Bug 53437 - ssh tasks prompt for kerberos username/password under Java 7
Summary: ssh tasks prompt for kerberos username/password under Java 7
Alias: None
Product: Ant
Classification: Unclassified
Component: Optional Tasks (show other bugs)
Version: 1.8.1
Hardware: PC All
: P2 major with 1 vote (vote)
Target Milestone: 1.9.0
Assignee: Ant Notifications List
Depends on:
Reported: 2012-06-19 15:52 UTC by Chris Nappin
Modified: 2013-01-06 21:48 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
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:


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

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