Skip to main content
Inspiring
May 28, 2009
Question

cfftp and Winscp

  • May 28, 2009
  • 3 replies
  • 1527 views

Gentlemen,

I am writing a script to connect o a remote SFTP server. The server that I am trying to login to requires a "private key" which is a file that the remote authentication process uses to log you in. In Winscp I browse to the file that is my key. That is in addition to my host server name, username and password. Using cfftp I can specify the host, the username and the password but I don't know what to do when it comes to this file which is my key: filename.ppk.

Any thoughts anybody?

And I need to pass that file so my connection gets established.

Thanks!

Ysais.

This topic has been closed for replies.

3 replies

Inspiring
May 29, 2009

This is the error message I am getting!

Message

invaid privatekey: \\pnky\wbdata\retail\cig\famoe.ppk

Participating Frequently
May 29, 2009

Scratch that, SFTP is supported in CF8.

Mack

Inspiring
May 29, 2009

Thanks Mack, Now I am trying to extablish a secure FTP connection and my code is complaining about the attribute connection. I am really troubled since I need to specify a connection name to be able to reuse my connection again. This is my code:

<cftry>
<cfftp action="open" connection="VeratadFtpConnection" fingerprint="#variables.fingerprint#" key=\\server\path\key.ppk passphrase="passphrase" secure="no" server="ftp.server.com" stoponerror="no" username="someuser">
<cfcatch type="any">
  <cfoutput>
  #cfcatch.Message#<br />
  #cfcatch.Detail#<br />
  #cfcatch.Type#<br />
  </cfoutput>
</cfcatch>
</cftry>

Participating Frequently
May 29, 2009

What is the complete error message that you're getting ?

Mack

Participating Frequently
May 29, 2009

As far as I'm aware ColdFusion doesn't support SFTP out of the box,

you'll need to use external libraries (for example

http://www.jcraft.com/jsch/).

Mack