Previous Topic: Operator PortsNext Topic: Run Telnet Script Operator


Example

Use the Run Telnet Command operator interactively

The Run Telnet Command operator operates in the following interactive manner:

  1. Open a Telnet connection to the remote host.
  2. Do one of the following:
  3. Send the User name.
  4. Read from the Telnet session until one of the following occurs:
  5. Send the password, then:
    1. Read from the Telnet session until one of the following occurs:
      • You match the pattern specified in User Command Prompt, and continue.
      • The Time to Wait for Prompts expires, then fail the operator.
    2. Determine if the operator is set to Run Commands as Another User:
      • If so, go to step 6.
      • If not, go to step 7.
  6. Send the Switch User Command and then do the following:
    1. Read from the Telnet session until one of the following occurs:
      • You match the pattern specified in Switch User Password Text Prompt.
      • You match the pattern specified in Switch User Command Prompt.
      • The Time to Wait for Prompts expires.
    2. Take one of the following actions, based on the outcome:
      • If you match the pattern for Switch User Password Text Prompt (password required to switch user), send the Switch User Password, and read from the Telnet session until one of the following occurs:

        - You match the pattern specified in Switch User Command Prompt. Go to Step 7.

        - The Time to Wait for Prompts expires and the operator fails.

      • If you match the pattern for Switch User Command Prompt (no password required to switch user), go to Step 7.
      • If the Time to Wait for Prompts expires, fail the operator.
  7. The Run Telnet Command operator has logged in and switched the user, if applicable. The operator is now ready to execute the commands.
  8. Loop through the commands, send one command at a time, and read from the Telnet session until one of the following occurs: