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.
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
Copy link to clipboard
Copied
Scratch that, SFTP is supported in CF8.
Mack
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>
Copy link to clipboard
Copied
What is the complete error message that you're getting ?
Mack
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.
Copy link to clipboard
Copied
This is the error message I am getting! Message | invaid privatekey: \\pnky\wbdata\retail\cig\famoe.ppk |