ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anderson, Rob (Global Trade)" <Rob.Ander...@nike.com>
Subject RE: sshexec not allowing commands on HP Unix 10.20
Date Tue, 10 Feb 2004 17:36:30 GMT
Are these commands successful from the command line? Try the following...

$ ssh xxxxxx@tvtest01 'date > /tmp/datefile'
$ echo $?

Send the output from these two commands. Sometimes sshd is compiled with a limited PATH that
does not include all the path elements that you have when you login to the box. To find out
what PATH sshd was compiled with run this...

$ ssh xxxxxx@tvtest01 'echo $PATH'

To see if this PATH includes what you are trying to run try this...

$ ssh xxxxxx@tvtest01 'which date'

I hope this helps.

-Rob Anderson

> -----Original Message-----
> From: Jim_Ring@bluecrossmn.com [mailto:Jim_Ring@bluecrossmn.com]
> Sent: Tuesday, February 10, 2004 9:26 AM
> To: user@ant.apache.org
> Subject: sshexec not allowing commands on HP Unix 10.20
> 
> 
> 
> I am using ant 1.6.0 with sshexec to access two UNIX servers. 
> Everything 
> is fine on the Sun Solaris server. However, on the HP Unix 
> 10.20 server, I 
> can can't run many commands.
> 
> For example, the following code works fine:
> <project name="scp/ssh test" basedir=".">
>   <target name="sshtest2">
>       <sshexec host="tvtest01" trust="yes"
>         username="xxxxxx"
>         password="yyyyyy"
>         command="echo hello world"/>
>   </target>
> </project>
> 
> ant -f build.test.ssh.cp.xml sshtest2
> Buildfile: build.test.ssh.cp.xml
> 
> sshtest2:
>   [sshexec] Connecting to tvtest01:22
>   [sshexec] hello world
> 
> BUILD SUCCESSFUL
> Total time: 9 seconds
> 
> 
> If I change the command to any of the following commands:
> 
> date > ~xxxxxx/datefile
> date > /tmp/datefile
> ls
> 
> I get back the following error:
> ant -f build.test.ssh.cp.xml sshtest2 -debug
> Apache Ant version 1.6.0 compiled on December 18 2003
> Buildfile: build.test.ssh.cp.xml
> Adding reference: ant.PropertyHelper
> Detected Java version: 1.3 in: C:\jdk1.3.1_06\jre
> Detected OS: Windows 2000
> Adding reference: ant.ComponentHelper
> Setting ro project property: ant.version -> Apache Ant version 1.6.0 
> compiled on December 18 2003
> Setting ro project property: ant.file -> 
> M:\deploy\scripts\build.test.ssh.cp.xml
> 
> Adding reference: ant.projectHelper
> Adding reference: ant.parsing.context
> Adding reference: ant.targets
> parsing buildfile M:\deploy\scripts\build.test.ssh.cp.xml with URI = 
> file:///M:/deploy/scripts/build.test.ssh.cp.xml
> Setting ro project property: ant.project.name -> scp/ssh test
> Adding reference: scp/ssh test
> Setting ro project property: ant.file.scp/ssh test -> 
> M:\deploy\scripts\build.te
> st.ssh.cp.xml
> Project base dir set to: M:\deploy\scripts
>  +Target:
>  +Target: sshtest2
> Build sequence for target `sshtest2' is [sshtest2]
> Complete build sequence is [sshtest2, ]
> 
> sshtest2:
>   [sshexec] Connecting to tvtest01:22
> 
> BUILD FAILED
> M:\\deploy\scripts\build.test.ssh.cp.xml:6: Remote command 
> failed with 
> exit status 1
>         at 
> org.apache.tools.ant.taskdefs.optional.ssh.SSHExec.execute(SSH
> Exec.java:232)
>         at 
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:306)
>         at org.apache.tools.ant.Task.perform(Task.java:401)
>         at org.apache.tools.ant.Target.execute(Target.java:338)
>         at org.apache.tools.ant.Target.performTasks(Target.java:365)
>         at 
> org.apache.tools.ant.Project.executeTarget(Project.java:1237)
>         at 
> org.apache.tools.ant.Project.executeTargets(Project.java:1094)
>         at org.apache.tools.ant.Main.runBuild(Main.java:669)
>         at org.apache.tools.ant.Main.startAnt(Main.java:220)
>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:215)
>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:90)
> 
> Total time: 10 seconds
> 
> tvtest01:/users/a0f551:> uname -a
> HP-UX tvtest01 B.10.20 E 9000/800 150686571 8-user license
> 
> Any help is appreciated!
> 
> 
> Jim Ring
> 
> 
> 
> The information contained in this communication may be confidential,
> and is intended only for the use of the recipient(s) named above.
> If the reader of this message is not the intended recipient, you
> are hereby notified that any dissemination, distribution, or
> copying of this communication, or any of its contents, is strictly
> prohibited. If you have received this communication in error,
> please return it to the sender immediately and delete the original
> message and any copy of it from your computer system. If you have
> any questions concerning this message, please contact the sender.
> 
> Unencrypted, unauthenticated Internet e-mail is inherently insecure.
> Internet messages may be corrupted or incomplete, or may incorrectly
> identify the sender.
> 


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


Mime
View raw message