@login
- Last Updated: May 12, 2023
- 1 minute read
- WhatsUp Gold
- Version 2026
- Version 2025
- Version 2024
- Version 2023.1
Typically, the first step in any Configuration Management script is to login to the device. This is typically done with the Configuration Management @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:
- The device prompts the user for their user name
- The user enters their user name
- The device prompts the user for their password
- The user enters their password
- 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:
- When it detects
UserNamePrompt, it sendsSettings.UserNameto the device followed byLoginTerminator. - When it detects
PasswordPrompt, it sends Settings.Password to the device followed byLoginTerminator. - When it detects
MorePrompt, it entersMoreResponse. - After entering the user name and password, if
@logindetectsCommandPrompt, it assumes that login was successful. Otherwise, it assumes that login failed.
If at any time the device's output stalls for more than ReadTimeout seconds, it is assumed that something is wrong, and the script returns failure.