Hi,

in theory, this should work :

<exec executable="ssh" failonerror="true">
   <arg value="stein inge morisbak@localhost" />
   <arg value="if [ -f /tmp/test.txt ]; then rm -f /tmp/test.txt ; fi" />
</exec>

when you use <arg value="'/> it generates a single argument.

BTW there is also a sshexec task in ant. Maybe it would work better ?

Regards,

Antoine

On 2/1/2011 3:24 PM, Stein Inge Morisbak wrote:
I am trying to call ssh using the ant exec task from maven. My problem is that 
I can't figure out how to escape spaces in usernames. I have tried:



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

Reply via email to