Did you have to figure out how to run multiple commands within the Ant’s Optional SSHExec task?

Here’s how to do it:

<sshexec host=”${host.name}” trust=”true” username=”${user}” password=”${pw}” keyfile=”${optional.keypair}” command=”command1 &amp;&amp; command2 &amp; command3″/>

You just basically chain the commands consecutively with “&amp;&amp;”