ssh_readme
SSH Components
Introduction
SSH components provides Smarfrog components for executing a command on a remote machine and copy file to/from a remote machine over SSH.
How to build
-
First build smarfrog framework by running ant dist in core/smartfrog
-
Build ant tasks by running ant in core/extras/ant
-
Build ssh by running ant in core/components/ssh
-
Copy following jar files from core/components/ssh/ build/dist/lib to core/smartfrog/dist/lib or update class path for the SmartFrog daemon.
-
jsch-20040505.jar
-
sshComponents.jar
-
Usage
SCP Component
SCP component is deployed as a Smarfrog component. It can be used to copy files (upload/download) to/from a remote host securely.
Attributes
| Attribute Name | Description | Optional/Mandatory |
| host | Machine running ssh daemon | Mandatory |
| userId | User login Id | Mandatory |
| passwordFile | File containing password | Mandatory |
| localFiles | Comma separated path to local files, in the form of a vector | Mandatory |
| remoteFiles | Comma separated path to remote files, in the form of a vector | Mandatory |
| transferType | Type of file transfer (Upload ot download) | Mandatory (Possible values are "get" and "put") |
| port | Port | Optional (default value is 22) |
| shouldTerminate | Should terminate this component after processsing or not | Optional ( Default is true) |
Please refer to sshExample.sf for a sample usage of SCP component.
SSHExec Component
SSHExec component is deployed as a Smarfrog component. It can be used to remotely execute commands securely over SSH.
Attributes
| Attribute Name | Description | Optional/Mandatory |
| host | Host running ssh daemon | Mandatory |
| usetId | Login ID | Mandatory |
| commands | Comma separated list of command to be executed in SSH session. | Mandatory |
| passwordFile | File containing password of user. | Mandatory |
| timeout | Timout for commands execution | Optional ( default value is 0) |
| port | Port | Optional (default value is 22) |
| failOnError | Terminate if any command fails. | Optional (Default is true) |
| shouldTerminate | Boolean attribute enables self termination of the SSHExec component after executing SSHExec commands. | Optional ( Default is true) |
Please refer to sshExecExample.sf for a sample usage of SSHExec component.

