Please take a look at this line:
${server_username}:${server_password}@@{server}:/tmp
The double @@ causes problems. Instead of user:pass@server it displays as user:passserver and therefore is unable to connect to the remote ssh server.
How do you tell ant to leave the @ be?
This is my code:
<for list="${externalLibs}" param="library">
<sequential>
<for list="${servers}" param="server">
<sequential>
<echo> Copying @{library} to @{server} ${server_username}:${server_password}@@@{server}:/tmp/@{library}/${@{library}}/
</echo>
<scp todir="${server_username}:${server_password}@@@{server}:/tmp/@{library}/${@{library}}/">
<fileset dir="/tmp/@{library}/${@{library}}/" />
</scp>
</sequential>
</for>
</sequential>
</for>
In the echo command, it shows like this:
Copying LibraryName to myserver.domain.com username:password@{server}:/tmp/LibraryName/LibraryBar