CLI interactive commands


[IMPORTANT: ]

: The following HP Switches do NOT support disabling or enabling the CLI interactive command mode (i.e., 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, the default choice for all command is yes, except as noted below. The CLI interactive mode command enables or disables interactive mode for the CLI session.

Syntax

session interactive-mode [ enable | disable ]

Enables or disables interactive mode for the CLI session.

The disable option disables interactive mode. The default choice for yes/no interactive commands will be yes except for commands when there is a prompt to save the config. The default for that is no.

The default choice for rebooting the switch is yes.

Note: This setting is not saved when the switch is rebooted.

Default: Enabled on all sessions.

CLI interactive mode when disabled

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

HP 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

HP 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 will not be affected by the interactive mode. A warning message is displayed, for example:

HP 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.