Enabling and disabling CLI interactive command mode


[IMPORTANT: ]

: The following HPE Switches do NOT support disabling or enabling the CLI interactive command mode (that is, session interactive-mode): 2520-series, 2520G-series, 2615-series, 2620–series, 2910al-series, and 2915-series.


When the CLI interactive command mode is enabled, you must explicitly enter the choice of yes (‘y’) or no (‘n’) for interactive commands. When interactive command mode is disabled, you are not prompted to explicitly enter the choice of yes (‘y’) or no (‘n’) unless you are saving a configuration.

  • Type “session interactive-mode enable” to enable the CLI interactive command mode.

  • Type “session interactive-mode disable” to disable the CLI interactive command mode.

The syntax is as follows:

session interactive-mode [enable|disable]

The interactive–mode setting is not saved when the switch is rebooted. The interactive mode is enabled on all CLI sessions by default.

The following example shows some commands used with the CLI interactive command mode disabled.

CLI interactive mode when disabled

switch(config)# no password all
Password protection for all will be deleted, continue [y/n]? y

switch(config)# boot system flash secondary
System will be rebooted from secondary image.
Do you want to continue [y/n]? y
Do you want to save current configuration [y/n]? n

To determine if the CLI interactive mode is enabled or disabled, enter the show session command.

CLI interactive mode enabled

switch(config)# show session
show message type   : Enabled
cli interactive mode: Enabled

Interactive commands requiring additional options

Interactive commands that require input other than yes or no are not affected when CLI interactive mode is disabled. A warning message is displayed when these commands are executed, for example:

Interactive mode is disabled; This command will be ignored. 
Enable cli-interactive-mode to use this command.

The following commands will issue this warning when interactive mode is disabled. An alternate way to enter the command (when one is available) is shown.

Command Non-Interactive Alternate Command

setup mgmt-interfaces

No equivalent non-interactive command

aaa port-access supplicant <port-list> secret

aaa port-access supplicant <port-list> secret <secret-string>

password manager

password manager plaintext <password-string>

password operator

password operator plaintext <password-string>

aaa port-access supplicant <port-list> secret

aaa port-access supplicant <port-list> secret <secret-string>

crypto host-cert generate self-signed

crypto host-cert generate self-signed <start-date> <end-date> <CNAME-STR> <ORG-UNIT-STR> <ORGANIZATION-STR> <CITY-STR> <STATE-STR> <CODE>

Menu commands

When CLI interactive mode is disabled, all CLI commands that launch the menu interface are not affected by the interactive mode. A warning message is displayed, for example:

switch(config)# menu
Interactive mode is disabled; This command will be ignored.
Enable cli-interactive-mode to use this command.

Other menu-based commands that will not be affected are:

  • setup

  • show interfaces display

SNMPv3 special cases

The following are special cases when using SNMPv3 with interactive mode.

  • snmpv3 user: In interactive mode, the command snmpv3 user will create snmpv3 users, even if snmpv3 has not been enabled.

  • snmpv3 user: When interactive mode is disabled, this command only enables snmpv3. It does not prompt for an authentication password. When the command is first executed, a default initial user is created. A message displays:

    User ‘initial’ has been created.