The auto-execute command command configures auto-run commands.
The undo auto-execute command command cancels auto-run commands.
By default, the auto-run function is disabled.
Usage Scenario
You can run the auto-execute command command to make a device run a command automatically on the corresponding user interface.
You can run the auto-execute command command to enable automatic execution of the Telnet command.
Precautions
The auto-execute command command applies to the VTY user interface.
When you log in to a device, the device automatically runs the commands that are configured by the auto-execute command command. After command execution, the user's terminal disconnects from the device.
Before saving the configuration of the auto-execute command command, ensure that you can log in to the device to cancel the command configuration.
If you use the auto-execute command command, you cannot configure the device in the user interface view. Therefore, use this command with caution.
# Configure the telnet 10.110.100.1 command to automatically run after a user logs in to the device using the VTY0 interface.
<HUAWEI> system-view [HUAWEI] user-interface vty 0 [HUAWEI-ui-vty0] auto-execute command telnet 10.110.100.1 Warning: The system will not be configured through ui-vty0. Continue? [Y/N]: y