Elements to automate a remote SSH session. These elements use additional nested <read> to indicate strings to wait for, and <write> tags to specify text to send.
This is a nested element of the SSH task; each element represents a single command executed within the users session.
The <exec> element executes a single command on the remote computer.
Attribute |
Values |
Required |
cmd |
The command to execute. |
Yes |
The commands to send to the server, and responses to wait for, are described as nested elements.
Declare (as a text child of this element) a string to wait for. . It also
has a string attribute, which is an alternative to specifying the string as a
text element.
Attribute |
Values |
Required |
timeout |
The number of milliseconds before the read operation will timeout. Defaults to 0 (Infinite) |
No |
echo |
Should the input be logged. Default is "true" |
No |
describes the text to send to the server.
Attribute |
Values |
Required |
newline |
Should a newline be appended to the text written to the session. Defaults to "true" |
No |
echo |
Should the output be logged. Default is "true" |
No |
Executing a command
<exec cmd="ls"/>
<exec cmd="passwd">
<read>password:</read><write>oldpass</write><read>password:</read><write>newpass</write><read>password:</read><write>newpass</write></exec>