• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfftp and Winscp

Participant ,
May 28, 2009 May 28, 2009

Copy link to clipboard

Copied

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.

TOPICS
Advanced techniques

Views

1.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 29, 2009 May 29, 2009

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 29, 2009 May 29, 2009

Copy link to clipboard

Copied

Scratch that, SFTP is supported in CF8.

Mack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 29, 2009 May 29, 2009

Copy link to clipboard

Copied

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>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 29, 2009 May 29, 2009

Copy link to clipboard

Copied

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

Mack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 29, 2009 May 29, 2009

Copy link to clipboard

Copied

Can you get your keyfile via a cffile call?  It may be the mapping there?  If a cffile can see that exact path and dump your key to screen, then it's not that.

The key attribute requires an absolute path.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 29, 2009 May 29, 2009

Copy link to clipboard

Copied

LATEST

This is the error message I am getting!

Message

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation