ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Loy <>
Subject RE: sshexec on remote server
Date Tue, 05 Jan 2010 21:35:32 GMT
That is exactly what you need to do.  Going through SSN does not activate interactive mode
which normally runs you .profile or .bashrc or whatever.  Your choice is to source it on the
command line, or source it in the shell scripts your are trying to execute.  

Tom Loy

-----Original Message-----
From: Antoine Levy Lambert [] 
Sent: Tuesday, January 05, 2010 4:33 PM
To: Ant Users List
Subject: Re: sshexec on remote server

Hello Eran,

maybe your problem is that you need to execute explicitly in your 
command the .profile or .bashrc or ... of the target user and host.

you might want to do something like

command=". .profile &amp;&amp; cd ${env.scripts.folder.path} &amp;&amp; ./PingServer"



eran123 wrote:
> Hi,
> I have a problem running scripts on a remote server. I reached the remote
> script but since the script is using environment variables my ant task
> (running on a local machine) does not have them. How can I solve this
> problem?
> My ant task looks like the following:
> <target  name="ping server ssh" depends="init">  
> 		<sshexec host="${}"    username="${env.username}"   
> trust="true"    
> 			password="${env.password}"   outputproperty="out3"    
> 			command="${env.scripts.folder.path} ; ./PingServer" />    
> 	</target>

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message