The below is my ColdFusion code to execute Putty(pscp.exe) , a command line application.
<cfset local.args[local.i++] = "-load" />
<cfset local.args[local.i++] = "default" />
<cfset local.args[local.i++] = "-batch" />
<cfset local.args[local.i++] = "-pw" />
<cfset local.args[local.i++] = variables.connectionParams.password />
<cfset local.args[local.i++] = arguments.localFile />
<cfset local.args[local.i++] = variables.connectionParams.username & "@" & variables.connectionParams.server & ":" & arguments.remoteFile />
<cfexecute name="#Application.config.getValue("external.puttyExe")#" arguments="#local.args#" variable="local.result" errorVariable="local.errorOut" timeout="1000" />
But executing this always ends up with the error message saying "The server's host key is not cached in the registry. You have no guarantee that the server is the computer you think it is. The server's rsa2 key fingerprint is: ssh-rsa 1024 c4:a2:e1:c9:73:57:15:5t:4d:d9:3d:5y:01:h6 Connection abandoned. Lost connection"
I am using FreeSSHd(installed on my machine) as the server to connect to.
Not able to find why this error message is coming always.