Bug 53437 - ssh tasks prompt for kerberos username/password under Java 7
ssh tasks prompt for kerberos username/password under Java 7
Status: RESOLVED FIXED
Product: Ant
Classification: Unclassified
Component: Optional Tasks
1.8.1
PC All
: P2 major with 1 vote (vote)
: 1.9.0
Assigned To: Ant Notifications List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2012-06-19 15:52 UTC by Chris Nappin
Modified: 2013-01-06 21:48 UTC (History)
0 users



Attachments

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:

  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