@login

Typically, the first step in any WhatsConfigured script is to login to the device. This is typically done with the WhatsConfigured @login command. The @login command can be used to login to devices that use a traditional user-name/password login procedure that works as follows:

  1. The device prompts the user for their user name
  2. The user enters their user name
  3. The device prompts the user for their password
  4. The user enters their password
  5. If login is successful, the device displays a command prompt and waits for the user to run commands

The @login command has no parameters, and is invoked as follows:

@login

When the @login command is executed, it does the following:

  1. When it detects UserNamePrompt, it sends Settings.UserName to the device followed by LoginTerminator.
  2. When it detects PasswordPrompt, it sends Settings.Password to the device followed by LoginTerminator.
  3. When it detects MorePrompt, it enters MoreResponse.
  4. After entering the user name and password, if @login detects CommandPrompt, it assumes that login was successful. Otherwise, it assumes that login failed.

If at any time the device's output stalls for more than Settings.ReadTimeout seconds, it is assumed that something is wrong, and the script returns failure.

See Also

About WhatsConfigured command types

@enable

Device commands

Low-level commands