10.2 Basic Security
10.2.6 Configuring timeouts
If a user is logged into a switch and performs no keystrokes (remains idle) for 5 minutes, the switch will automatically log the user out. This feature is referred to as an "idle timeout." If the user forgets to log out and leaves his or her terminal unattended, this feature would prevent someone from gaining unauthorized access to the switch by using the terminal. Although the default setting of this feature is 5 minutes, is can be altered with the set logout command on a set command-based switch:

Switch> (enable) set logout [number of minutes]

The example in Figure shows how to set the automatic session logout to 20 minutes and how to disable the automatic logout feature.

To configure a timeout on a Cisco IOS command-based switch, you must first choose the line (console or vty) to apply it to and then specify the amount of time. This works just as a router would. The commands to set the timeout on the console port of a Cisco IOS command-based switch to 20 minutes are shown in Figure .