-
Notifications
You must be signed in to change notification settings - Fork 8
How to use
denstar edited this page Jun 4, 2013
·
2 revisions
to get ssh working as a tag within a web context, I dropped
https://github.com/cfmlprojects/cfssh/tree/master/src/cfssh/tag/cfssh/cfc
to
{railo site context}/library/tag
eg for Railo Express /railo/WEB-INF/railo/library/tag/
To list a directory:
<cfssh action="listdir"
username="username"
password="password"
host="hostname"
port="22"
timeout="30"
name="qryDirectory"
directory="/var/tmp/"
/>
<cfdump var="#qryDirectory#" label="qryDirectory" expand="true" />
To upload a file:
<cfssh action="putFile"
username="username"
password="password"
host="hostname"
port="22"
timeout="30"
name="ssh"
localFile="#ExpandPath('./test.txt')#"
remoteDirectory="/var/tmp/"
filename="test.txt"
/>
<cfdump var="#ssh#" label="putFile" expand="true" />
This returns -1
Take a look at jsch.cfc for other functions eg function getFile( required username, password="", key="", passphrase="", required host, numeric port=22, numeric timeout=30, fingerprint="", required remoteFile, required localFile, remoteDirectory="" )
I did not see one for deleting a file.