Objective

The Idle Session Timeout Settings determine the interval that the management sessions can remain idle before they timeout. It is set for ten minutes by default. Once the time value is reached, you must log in again to be able to re-establish connection for the following sessions:

- HTTP Session

- HTTPS Session

- Console Session

- Telnet Session

- SSH Session

This article provides instructions on how to configure the idle session timeout settings on your switch through the Command Line Interface (CLI).

If you are unfamiliar with CLI, and would prefer to use the Graphical User Interface (GUI) for configuration, click here.

Applicable Devices

- Sx350 Series

- SG350X Series

- Sx550X Series

Software Version

- 2.3.5.63

Configure Idle Session Timeout Setting

Step 1. In order to remotely access the CLI of your switch, you need to enable Telnet or SSH access on the switch.

Log in to the web configuration utility page.

From the main menu, choose Security>TDP/UDP Services.

Enable Telnet Service or SSH Service by checking the appropriate box and click Apply.

Step 2. Log into the switch console. The default username and password is cisco. If you have configured a new username or password, enter those credentials instead.

Note: To learn how to access an SMB switch CLI through SSH or Telnet, click here.

Note: The commands may vary depending on the exact model of your switch. In this example, the SG350X switch is accessed through Telnet.

Step 3. From the Privileged EXEC mode of the switch, enter the Global Configuration mode by entering the following:

SG350X#configure

Step 4. To configure the HTTP Session Timeout time enter the following:

SG350X(config)#ip http timeout-policy [idle-seconds] [http-only | https-only]

The options are:

- idle-seconds - Specifies the maximum number of seconds that a connection is kept open if no data is received or response data cannot be sent out. The range is from 0 up to 86400 seconds.

- http-only - (Optional) The timeout is specified only for HTTP.

- https-only - (Optional) The timeout is specified only for HTTPS.

Note: If a browser remains idle for more than the specified timeout value, the switch closes the session. The default value is 10 minutes. In this example, 0 is entered which means automatic logoff is disabled.

Step 5. To configure the session idle time interval during which the system waits for user input before automatic logoff for a specific line, enter the Line Configuration mode by entering the following:

SG350X(config)#line [console | telnet | ssh]

The options are:

- Console - Enters the terminal line mode.

- Telnet - Configures the device as a virtual terminal for remote access (Telnet).

- SSH - Configures the device as a virtual terminal for secured remote access (SSH).

Note: If the line session remains idle for more than the specified timeout value, the switch closes the session. The default value is 10 minutes.

Note: In this example, terminal line mode is entered.

Step 6. To set the session idle time interval during which the system waits for user input before automatic logoff, enter the following:

SG350X(config)#exec-timeout [minutes]

Note: In this example, 30 minutes is used. The system will automatically log off once it has been idled for 30 minutes.

Step 7. Enter the exit command to go back to the Privileged EXEC mode:

SG350X(config)#exit

Step 8. Repeat steps 4 to 6 to configure other lines then enter the end command to go back to the Privileged EXEC mode:

SG350X(config)#end

Step 9. (Optional) To display the HTTP or HTTPS idle settings on your switch, enter the following:

SG350X#show ip [http | https]

Step 10. (Optional) To display the line idle settings on your switch, enter the following:

SG350X#show line [console | telnet | ssh]

The options are:

- Console - (Optional) Displays the console configuration.

- Telnet - (Optional) Displays the Telnet configuration.

- SSH - (Optional) Displays the SSH configuration.

Step 11. (Optional) In the Privileged EXEC mode of the switch, save the configured settings to the startup configuration file by entering the following:

SG350X#copy running-config startup-config

Step 12. (Optional) Press Y for Yes or N for No on your keyboard once the Overwrite file [startup-config]...prompt appears.

You should now have configured the Idle Session Timeout settings on the switch through the CLI.