SCP In Cold Fusion 6?

How to do it?
KCarter80Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SidFishesCommented:
afaik you can't natively

I created a procedure to grab a daily xml file from my site via scp

 what I have done is:

set up cygwin on the windows server and an ssh server
created a ssh user and keyfile
created an ant script to login copy the file via scp and then delete the remote file (s)

<project name="CopyRemoteXML" default="GetFiles" basedir=".">
<echo> ${ant.version}</echo>
&#8722;
      <target name="GetFiles">
<scp trust="true" keyfile="C:\pathtoMyKeyfile\sshKey" toDir="\\server\xml\" passphrase="" file="somelogin@someco.com:/cygdrive/d/somedir/xml/*.xml">
                     
          </scp>
<sshexec host="someco.com" username="somename" trust="true" keyfile="C:\pathtoMyKeyfile\sshKey"
 command="rm /cygdrive/d/somedir/xml/*.xml"/>
</target>
</project>

then I created a vbs script to run the ant script and write a log entry. I added the it to windows task scheduler to run every night

Set ObjWS = WScript.CreateObject("WScript.Shell")
ObjWS.Run ("C:\Eclipse\eclipse\plugins\org.apache.ant_1.6.5\bin\ant -buildfile \\server\scripts\build.xml")


Const FOR_APPENDING = 8
strFileName = "\\server\xml\logs\fetchlog.txt"
strContent  = "Script Ran at:" & Now()  & vbNewLine

Set objFS = CreateObject("Scripting.FileSystemObject")
Set objTS = objFS.OpenTextFile(strFileName,FOR_APPENDING)
objTS.Write strContent


You could run this vbs script via cfexecute or cfschedule

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
KCarter80Author Commented:
Any body have any experience doing this on Linux (Redhat ES 3) boxes running CF?
SidFishesCommented:
that should be even easier(i think)  since scp is native to the OS

something like this perhaps...
<cfexecute
  name = "scp"
  arguments = "somefile.txt username@someplace:somedir/"
  timeout = "6000">
</cfexecute>


Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

KCarter80Author Commented:
This is close to what I need.

However:

I'd like to use CF 6.1 (on a Red Hat server) to SCP a file to a remote host.

CF runs as the nobody user. So I can't set up a key exchange since the nobody user doesn't have the usual directories to put the key in.

Anyone have any thoughts on how to do this?
SidFishesCommented:
at minimum i'd say paq since my original solution works for windows folks and has value...(not that the original q was specific at all)...as for the points ...whatever
KCarter80Author Commented:
The windows solution does work in windows. Was never able to find a solution in Linux. Will accept the windows solution.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.