we are adding Custom workflow step that should have the sftp code which will copy the files to secure external location from aem cloud.
we have tried the above method from the Jsch Api , but the sourcePath from the above is taking the file from the system location and not from inside aem.
Our use case is to send the aem html, assets to the outside location
If you use "put" you can use an input stream to read from. With JCR API you can read the content of a node as stream.