Ant SCP Task:
<?xml version="1.0" encoding="UTF-8"?> <project name="MyProject" default="copyToUnix" basedir="."> <target name="copyToUnix"> <scp todir="user@vserver:/var/www/myFolder/" keyfile="/Users/dummy/.ssh/id_rsa"> <fileset dir="WebContent"> <include name="*.php" /> </fileset> </scp> </target> </project>
You need an additional jar file for ant scp task: http://www.jcraft.com/jsch/index.html