Configure the Maximum Number of Sessions

Use the following procedure to configure the maximum number of sessions on the switch. The max-sessions value configures the number of times a particular role-based user can log in to the switch through the SSH session at the same time. The default max-sessions value is 3.

The max-sessions value applies only for SSH sessions, and only with enhanced secure mode enabled.

Before you begin

  • You must enable enhanced secure mode in either the JITC or non-JITC sub-modes. As a best practice, use the non-JITC sub-mode because the JITC sub-mode is more restrictive and prevents the use of some troubleshooting utilities.

Procedure

  1. Enter Global Configuration mode:

    enable

    configure terminal

  2. Configure the maximum number of sessions:

    password max-sessions <1–8> user-name WORD<1–255>

  3. Optional: Configure the password reuse rule to the default:

    default password max-sessions

  4. Save the configuration:

    save config

    Note

    Note

    The save config command saves the configuration file with the filename configured as the primary configuration filename in boot config. Use the command show boot config choice to view the current primary and backup configuration filenames.

Example

Configure the reuse rule to 5:

Switch:1>enable
Switch:1#configure terminal
Switch:1(config)#password max-sessions 5 user-name jsmith
Switch:1(config)#save config

Variable definitions

Use the data in the following table to use the password max-sessions command.

Variable

Value

<1–8>

Specifies the maximum number of sessions. The default is 3.

user-name WORD<1–255>

Specifies the user-name.