You don't! Maybe in CF8, but not with cf7.
I used a custom tag called cfx_SecureFTP and cfx_SecureFTP.
Can't find them anymore on Google, but I could email you what I
have.
OR maybe this would work for you:
http://www.jscape.com/sftp/index.html
" did this just recently for a client. We implemented a
fairly simple
solution using Jscape Secure FTP Factory for Java. It works
well, however I
was not able to get listeners to work, so reporting on
successfully
transfers is not great. I do a directory listing after the
upload and look
for the file I just uploaded. This works in my case, because
the file name
is always unique. Might not work for you. Maybe you can find
a better way.
The url is
http://www.jscape.com/sftp/index.html
it costs $499.00.
This is the code we used to implement it:
<cfset jarpath =
'C:\CFusionMX7\wwwroot\WEB-INF\lib\sftp.jar'>
<cfscript>
system = CreateObject("java", "java.lang.System");
classpath = system.getProperty("java.class.path");
if (FindNoCase("sftp", classpath) LTE 0)
{
classpath = classpath & ";#jarpath#";
system.setProperty("java.class.path",classpath);
}
util = CreateObject("java",
"com.jscape.inet.ssh.util.SshParameters");
sLogin =
util.init('#dailyftp_profiles.ftpaddress#','#dailyftp_profiles.username#','#dailyftp_profiles.
password#');
sftpObject = CreateObject("java",
"com.jscape.inet.sftp.Sftp");
sftp = sftpObject.init(sLogin);
// connect and set timeout
sftp.connect();
sftp.setTimeout(1000);
// set remote directory if requested
if (#dailyftp_profiles.homedirectory# neq ''){
sftp.setDir("#dailyftp_profiles.homedirectory#");
}
sftp.setAuto(true);
// upload the file
sftp.upload("#request.general_tempfile_root##tempfilename#");
sftp.renameFile("#tempfilename#","#remoteFileName#");
//get listing
dirListing2 = sftp.getDirListingAsString();
// disconnect from SSH server
sftp.disconnect();
</cfscript>
<!--- check that the file was uploaded --->
<cfif not dirListing2 contains '#remoteFileName#'>
<!--- do error handling here for failed upload --->
</cfif>
from link:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:234022