The attached patch is a quick hack to implement sftp task, which is based on ftp task and using jsch for sftp functionality. It accepts attributes for ftp and scp tasks except for 'binary', 'passive', 'separator' and 'umask'. It seems following tasks are working on my testing, however, frankly to say, I'm not familiar with ftp task and have never used and run it, so I may mis-understand its operational semantics. Comments, suggestions and feedbacks are welcome. PS 1. that patch is for ant_20060509104815.tar.gz PS 2. jsch-0.1.28 is required. <taskdef name="sftp" classname="org.apache.tools.ant.taskdefs.optional.ssh.SFTP"/> <sftp action="send" server="${server}" userid="${userid}" password="${password}" remotedir="incoming" depends="yes"> <fileset dir="htdocs/manual"/> </sftp> <sftp action="get" server="${server}" userid="${userid}" password="${password}"> <fileset dir="htdocs/manual" > <include name="**/*.html"/> </fileset> </sftp> <sftp action="del" server="${server}" userid="${userid}" password="${password}" > <fileset> <include name="**/*.tmp"/> </fileset> </sftp> <sftp action="list" server="${server}" userid="${userid}" password="${password}" listing="data/sftp.listing" > <fileset> <include name="**"/> </fileset> </sftp> <sftp action="mkdir" server="${server}" userid="${userid}" password="${password}" remotedir="test" /> <sftp action="chmod" server="${server}" userid="${userid}" password="${password}" chmod="0700" > <fileset> <include name="*.log"/> </fileset> </sftp>
Created attachment 18250 [details] an implementation of sftp task
Created attachment 18461 [details] minor bug fixes and deleting some redundant code
Created attachment 18462 [details] sftp.html
Created attachment 19287 [details] a patch to use sftp protocol in scp task. a patch to compile with jsch-0.1.29(and later).
*** This bug has been marked as a duplicate of bug 39373 ***