Task to automate a remote telnet session. The task uses nested <read> to indicate strings to wait for, and <write> tags to specify text to send.
<p>If you do specify a userid and password, the system will assume a common unix prompt to wait on. This behavior can be easily over-ridden.</p>
<h3>Parameters</h3>
<tableborder="1"cellpadding="2"cellspacing="0">
<tr>
<th>Attribute</th>
<th>Values</th>
<th>Required</th>
</tr>
<tr>
<td>userid</td>
<td>the login id to use on the telnet server.</td>
<td>No</td>
</tr>
<tr>
<td>password</td>
<td>the login password to use on the telnet server.</td>
<td>No</td>
</tr>
<tr>
<td>server</td>
<td>the address of the remote telnet server.</td>
<td>Yes</td>
</tr>
<tr>
<td>port</td>
<td>the port number of the remote telnet server. Defaults to port 23.</td>
<td>No</td>
</tr>
<tr>
<td>initialCR</td>
<td>send a cr after connecting ("yes"). Defaults to "no".</td>
<td>No</td>
</tr>
<tr>
<td>timeout</td>
<td>set a default timeout to wait for a response. Specified in seconds. Default is no timeout.</td>
<td>No</td>
</tr>
</table>
<h3>Examples</h3>
A simple example of connecting to a server and running a command. This assumes a prompt of "ogin:" for the userid, and a prompt of "assword:" for the password.
A timeout can be specified at the <telnet> level or at the <read> level. This will connect, issue a sleep command that is suppressed from displaying and wait 10 seconds before quitting.