1.1.8 Session Management

Information

This sequence describes enabling CLI session limits

Session management enhances security by enforcing specific CLI user session requirements for console, SSH and telnet connections.

The following information is provided at the time of a successful login:

- When applicable, the number of failed login attempts since the most recent successful login.
- The date, time, and location (console or IP address or hostname) of the most recent previous successful login.
- The count of successful logins within the past (configurable) time period.

The Recommendation of CIS is to use the following as a minimum setting

cli-session
max-per-user 1
tracking-range 25
timeout 15

Solution

Setting Max sessions per user:

switch# config
switch(config)# cli-session
switch(config-cli-session)# max-per-user <max-sessions>
switch(config-cli-session)# exit
switch(config)# exit
switch#

Setting session timeout:

switch# config
switch(config)# cli-session
switch(config-cli-session)# timeout <timeout in minutes>
switch(config-cli-session)# exit
switch(config)# exit
switch#

Setting session tracking records retention:

switch# config
switch(config)# cli-session
switch(config-cli-session)# tracking-range <tracking days>
switch(config-cli-session)# exit
switch(config)# exit
switch#

Recommended values -

switch(config)# cli-session
switch(config-cli-session)# max-per-user 1
switch(config-cli-session)# timeout 15
switch(config-cli-session)# tracking-range 25
switch(config-cli-session)# exit

Impact:

Limiting concurrent sessions and session timeouts is crucial for enhancing security and preventing unauthorized access to accounts. Failure to restrict the number of active sessions per user and setting appropriate timeout durations, can expose you to risks like session hijacking, shared account access, and compromised sessions.

See Also

https://workbench.cisecurity.org/benchmarks/24202