<ssh-exec>

Purpose/Function

Executes one or more commands using SSH.

Attributes

NAME

TYPE

DEFAULT VALUE

DESCRIPTION

endpoint

java.lang.String

required

a URI for the endpoint

execDir

java.lang.String

null

cd to this directory before executing the command

outputFile

java.lang.String

null

file to write output stream to

errorFile

java.lang.String

null

file to write error stream to

appendOut

boolean

false

append output stream to file rather than overwriting

appendErr

boolean

false

append error stream to file rather than overwriting

bufferOut

boolean

false

write output stream to internal buffer

bufferErr

boolean

false

write error stream to internal buffer

logOut

boolean

false

send output to logger

logErr

boolean

false

send error to logger

publishOut

boolean

false

publish output stream

publishErr

boolean

false

publish error stream

Elements

TAG

TYPE

COUNT

DESCRIPTION

<command>

java.lang.String

0:N

command to execute on remote host

ReturnValues

DEFAULT NAME

TYPE

DESCRIPTION

sshOut

java.lang.String

the contents of the output buffer (may be null)

sshErr

java.lang.String

the contents of the error buffer (may be null)

NOTES
  1. To use GSISSH, set the URL of the endpoint to gsissh://HOST; the proxy will be obtained from the standard on-disk location.
  2. To use username/password authentication, include these in the endpoint URL (e.g., ssh://arossi:43x84Hpq7@HOST).
  3. If ssh public-key authorization is set up between the endpoints, ssh://HOST without username or password will work.

Examples

...
<ssh-exec endpoint="ssh://remus.livio.it" execDir="/etruria/home" bufferOut="true">
    <command>chmod 744 romulus</command>
    <command>cat romulus</command>
    <return-value defaultName="sshOut"/>
</ssh-exec>
...
  • No labels