49
Usage guidelines
CAUTION:
After configuring this command for a user line, you might be unable to access the CLI through the
user line. Make sure you can access the CLI through a different user line before you configure this
command and save the configuration.
The device will automatically execute the specified command when a user logs in through the user
line, and close the user connection after the command is executed.
This command is not supported in AUX line view or AUX line class view.
This command is available in both user line view and user line class view. A non-default setting in
either view takes precedence over a default setting in the other view. A non-default setting in user
line view takes precedence over a non-default setting in user line class view.
A configuration change made by this command does not take effect for the current session. It takes
effect for subsequent login sessions.
Examples
# Configure the device to automatically execute the telnet 192.168.1.41 command when a user logs
in through VTY line 0.
<Sysname> system-view
[Sysname] line vty 0
[Sysname-line-vty0] auto-execute command telnet 192.168.1.41
This action will lead to configuration failure through line-vty0. Are you sure?
[Y/N]:y
[Sysname-line-vty0]
# To verify the configuration, Telnet to the device (192.168.1.40).
The device automatically Telnets to 192.168.1.41. The following output is displayed on the
configuration terminal:
C:\> telnet 192.168.1.40
******************************************************************************
* Copyright (c) 2010-2017 Hewlett Packard Enterprise Development LP *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
<Sysname>
Trying 192.168.1.41 ...
Press CTRL+K to abort
Connected to 192.168.1.41 ...
******************************************************************************
* Copyright (c) 2010-2017 Hewlett Packard Enterprise Development LP *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
<Sysname.41>
This operation is the same as directly logging in to the device at 192.168.1.41 through Telnet. When
you close the Telnet connection to 192.168.1.41, the Telnet connection to 192.168.1.40 is closed at
the same time.