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.  

Cheers,
 
Tom Loy


-----Original Message-----
From: Antoine Levy Lambert [mailto:anto...@gmx.de] 
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 && cd ${env.scripts.folder.path} && 
./PingServer"

regards,

Antoine


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="${env.server.host}"    
> username="${env.username}"   
> trust="true"    
>                       password="${env.password}"   outputproperty="out3"    
>                       command="${env.scripts.folder.path} ; ./PingServer" />  
>   
>       </target>
>   


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


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

Reply via email to