Hi Antoine, Thank you very much. .profile made it worked :-)
Regards, Eran antoinell wrote: > > 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 > > > -- View this message in context: http://old.nabble.com/sshexec-on--remote-server-tp27004641p27099379.html Sent from the Ant - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org