ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anderson, Robert H - MWT" <>
Subject RE: ssh task - doesn't behave the same as command line ssh
Date Mon, 21 Apr 2003 22:03:41 GMT
I would recommend using the sshexec task. I have never used the sshtools ant

-Rob A

-----Original Message-----
From: Matt Reason []
Sent: Monday, April 21, 2003 2:53 PM
To: Ant Mailing List (E-mail)
Subject: ssh task - doesn't behave the same as command line ssh

I am using the ssh task to connect to a remote server and fire off a
shell script that deploys files from a big tarball into the htdoc dir of
that server.
The code looks something like this:
 <taskdef name="ssh" classname="com.sshtools.ant.Ssh">
    <classpath refid="project.class.path"/>
 <target name="ssh">
     <ssh host="tecate" verifyhost="false" username="w3admin"
        <exec cmd="./ > matt.log"/>
      [ssh] Initializing J2SSH
      [ssh] Creating connection to tecate:22
      [ssh] Connecting....
      [ssh] Authenticating w3admin
      [ssh] Performing password authentication
      [ssh] Authentication complete
      [ssh] Executing ./ > matt.log
When I run this target, the thing just hangs.  The shell doesn't
complete and the java process on my local machine goes crazy and takes
up 100% of the CPU.  I've also tried it without the output re-direct.
If I was to login to the remote machine using ssh on the comand line and
then execute the shell, it works perfectly and takes about 2 seconds.
Anybody know what I'm doing wrong?  Should I be using SSHExec?
Thanks in advance,

View raw message