That's what I thought also, but in practice it doesn't work, at least not on my machine (mac os x)
I know about the sshexec task, but the problem with this task is that it is not possible to give options to the ssh command. I left that out in my example, but I need to give the '-tt' option to ssh. Like this: <exec executable="ssh" failonerror="true"> <arg value="-tt" /> <arg value="stein inge morisbak@localhost" /> <arg value="if [ -f /tmp/test.txt ]; then rm -f /tmp/test.txt ; fi" /> </exec> Regards, Stein Inge On 1. feb. 2011, at 23.04, Antoine Levy-Lambert wrote: > 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 > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org