Display feature availability | ||
---|---|---|
|
Mode
...
of operation
The SOSSSHJob2JSAdapter can run with either the Trilead implementation (default) or the JSch implementation by JCraft.
...
The Job sets an environment variable to the session on the remote host with the name SCHEDULER_RETURN_VALUES which is available for the script or command to be executed on the remote machine. The value (the name of the temporary file) for this environment variable will be generated at runtime. After the execution of the script or command the jobs reads the return values from that temporary file on the remote host, returns them to the Jobscheduler for further processing and deletes the temporary file afterwards.
...
Jira | ||||||||
---|---|---|---|---|---|---|---|---|
|
Passing variables back to the JobScheduler
To use this feature you have to make sure that your command or command script writes the key-value-pair you want to have passed back to the JobScheduler, to the temporarily created file.
...
Example
The command echo MYPARAM=myTestParam >> $SCHEDULER_RETURN_VALUES
writes MYPARAM=myTestParam
to the temporary file defined by the environment variable $SCHEDULER_RETURN_VALUES
.
The environment variable will be set implicitily during the job execution.
New
...
parameters
...
General information
The default values use the linux bash syntax. These parameters have to be set only if running on systems using a different syntax than the linux bash syntax. Please choose the format of the command value and it placeholders according to the operating system on the remote host.
...
To use the return-values-feature configure a SSH job with JOE and choose SOSSSHJob2JSAdapter
.
Example 1:
...
A minimal SSH Job configuration
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<?xml version="1.0" encoding="ISO-8859-1"?> <job title="Launch remote commands or executable files by SSH" stop_on_error="no"> <description > <include file="jobs/JobSchedulerSSHJob.xml"/> </description> <params > <param name="host" value="HOSTNAME"/> <param name="port" value="22"/> <param name="user" value="USERNAME"/> <param name="password" value="PASSWORD"/> <param name="auth_method" value="password"/> <param name="command" value="printenv"/> </params> <script language="java" java_class="sos.scheduler.job.SOSSSHJob2JSAdapter"/> <run_time /> </job> |
Example 2:
...
A job chain that processes return values
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<?xml version="1.0" encoding="ISO-8859-1"?> <job name="setValueRemote" title="Launch remote commands or executable files by SSH" order="yes" stop_on_error="no"> <description > <include file="jobs/JobSchedulerSSHJob.xml"/> </description> <params > <param name="host" value="HOSTNAME"/> <param name="port" value="22"/> <param name="user" value="USERNAME"/> <param name="password" value="PASSWORD"/> <param name="auth_method" value="password"/> <param name="command" value="echo ADD='Hallo Welt' >> \$SCHEDULER_RETURN_VALUES"/> </params> <script language="java" java_class="sos.scheduler.job.SOSSSHJob2JSAdapter"/> <run_time /> </job> |
...
For known limitations using the SSH Job to connect to a Windows Remote Host see Limitations when using SSH jobs for Windows.
Known
...
issues
Connecting over SSH
Sometimes while connecting an error occurs which states "java.security.InvalidAlgorithmParameterException: Prime size must be multiple of 64, and can only range from 512 to 2048 (inclusive)".
...