Try the same tests with jsch 0.1.16. What are the results? I believe these are problems with Jsch.
-Rob Anderson > -----Original Message----- > From: Dominique Devienne [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 11, 2005 2:27 PM > To: 'Ant Users List' > Subject: Multiple <sshexec> invocations > > > First time <sshexec> user, so please be gentle ;-) > I'm using Ant 1.6.2 with Jsch 0.1.21. > > I'm a bit baffled by the results I get using <sshexec>. > The session below shows all relevant information. > > If I run just one target, doing one <sshexec>, > it works fine, i.e. I get the echo to execute correctly. > > If I run twice the same target (build linux linux), > the first <sshexec> works, but the second fails with > an "Auth cancel" exception. > > If OTOH the two <sshexec> belong to the same project, > i.e. are executed as dependencies of a single target > (build linux-solaris), then the first one works, but > the second one this time doesn't fail, but doesn't > provide any output at all. > > All invocations are below, and show what I mean. > > Anybody has any insight? Thanks, --DD > > P:\com_lgc\cycle11\infrasdk>dir /B lib > jsch-0.1.21.jar > > P:\com_lgc\cycle11\infrasdk>type build.bat > @..\ant\bin\ant -emacs -lib lib\jsch-0.1.21.jar %* > > P:\com_lgc\cycle11\infrasdk>type build.xml > <?xml version="1.0"?> > <project name="sshexec"> > <property file="build.properties" /> > > <!-- ==================================================== --> > <target name="linux"> > <sshexec host="${linux.server}" trust="true" timeout="${10sec}" > username="${username}" password="${password}" > command="echo Hello from ${linux.server}" /> > </target> > > <!-- ==================================================== --> > <target name="solaris"> > <sshexec host="${solaris.server}" trust="true" timeout="${10sec}" > username="${username}" password="${password}" > command="echo Hello from ${solaris.server}" /> > </target> > > <!-- ==================================================== --> > <target name="linux-solaris" depends="linux, solaris" /> > <target name="solaris-linux" depends="solaris, linux" /> > </project> > > P:\com_lgc\cycle11\infrasdk>build linux > Buildfile: build.xml > > linux: [infrasdk] > Connecting to bar.lgc.com:22 > Hello from bar.lgc.com > > > BUILD SUCCESSFUL > Total time: 2 seconds > P:\com_lgc\cycle11\infrasdk>build solaris > Buildfile: build.xml > > solaris: [infrasdk] > Connecting to foo.lgc.com:22 > core file size (blocks) 0 > ... > Hello from foo.lgc.com > > > BUILD SUCCESSFUL > Total time: 2 seconds > P:\com_lgc\cycle11\infrasdk>build linux linux > Buildfile: build.xml > > linux: [infrasdk] > Connecting to bar.lgc.com:22 > Hello from bar.lgc.com > > > linux: [infrasdk] > Connecting to bar.lgc.com:22 > > BUILD FAILED > P:\com_lgc\cycle11\infrasdk\build.xml:22: > com.jcraft.jsch.JSchException: > Auth cancel > > Total time: 2 seconds > P:\com_lgc\cycle11\infrasdk> > P:\com_lgc\cycle11\infrasdk> > P:\com_lgc\cycle11\infrasdk>build solaris solaris > Buildfile: build.xml > > solaris: [infrasdk] > Connecting to foo.lgc.com:22 > core file size (blocks) 0 > ... > Hello from foo.lgc.com > > > solaris: [infrasdk] > Connecting to foo.lgc.com:22 > > BUILD FAILED > P:\com_lgc\cycle11\infrasdk\build.xml:29: > com.jcraft.jsch.JSchException: > Auth cancel > > Total time: 2 seconds > P:\com_lgc\cycle11\infrasdk> > P:\com_lgc\cycle11\infrasdk> > P:\com_lgc\cycle11\infrasdk>build linux-solaris > Buildfile: build.xml > > linux: [infrasdk] > Connecting to bar.lgc.com:22 > Hello from bar.lgc.com > > > solaris: [infrasdk] > Connecting to foo.lgc.com:22 > > BUILD SUCCESSFUL > Total time: 3 seconds > P:\com_lgc\cycle11\infrasdk>build solaris-linux > Buildfile: build.xml > > solaris: [infrasdk] > Connecting to foo.lgc.com:22 > core file size (blocks) 0 > ... > Hello from foo.lgc.com > > > linux: [infrasdk] > Connecting to bar.lgc.com:22 > > BUILD SUCCESSFUL > Total time: 3 seconds > P:\com_lgc\cycle11\infrasdk> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
