ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ahmet Sayar" <asa...@cs.indiana.edu>
Subject Re: sshexec
Date Thu, 29 Jan 2004 22:38:31 GMT
Dear all,

(First I would like to thank to Anderson for his email)

As you know sshexec basic format is as below.

<taskdef name="sshexec"
classname="org.apache.tools.ant.taskdefs.optional.ssh.SSHExec"/>
<target name="secure_run" description="executes any command">
    <sshexec host="xxxxxx"
          username="xxxx"
          password="xxxx"
          command="command1"/>
</target>


Can I implement sshexec by using <exec> task similar to codes below? :)
If I can, how?

<exec dir="xxx/xx/xxxxx/."
executable="org.apache.tools.ant.taskdefs.optional.ssh.SSHExec">
      <arg value="host_name"/>
      <arg value="user_name"/>
      <arg value="password"/>
      <arg value="command"/>
</exec>

OR

<exec dir="xxx/xx/xxxxx/." executable="java">
      <arg value="-classname
org.apache.tools.ant.taskdefs.optional.ssh.SSHExec"/>
      <arg value="-h host_name"/>
      <arg value="-u user_name"/>
      <arg value="-p password"/>
</exec>

Thanks,
Sayar.


----- Original Message ----- 
From: "Anderson, Rob (Global Trade)" <Rob.Anderson2@nike.com>
To: "Ant Users List" <user@ant.apache.org>
Sent: Thursday, January 29, 2004 4:52 PM
Subject: RE: sshexec


> Do it like this...
>
>   <sshexec host="xxxxxx"
>          username="xxxx"
>          password="xxxx"
>          command="cd /ass/home/asdad/ ; command1"/>
>
> -Rob Anderson
>
> Do you really have a directory at the root level called "ass"? He said
"ass". That's funny :)
>
> > -----Original Message-----
> > From: Ahmet Sayar [mailto:asayar@cs.indiana.edu]
> > Sent: Thursday, January 29, 2004 12:00 PM
> > To: Ant Users List
> > Subject: sshexec
> >
> >
> > Dear All,
> >
> > Can I give a parameter (for instance directory="/ass/home/asdas/") to
> > sshexec to run specific command on a specific path at the
> > remote host? Or is
> > there any other alternative solution to this problem?
> >
> >  <sshexec host="xxxxxx"
> >         username="xxxx"
> >         password="xxxx"
> >         command="command1"/>
> >
> > Thanks,
> > Sayar
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message