5.7 Set a timeout to automatically terminate idle ESXi Shell and SSH sessions

Information

Set a timeout to automatically terminate any idle ESXi shell and SSH sessions.

*Rationale*

If a user forgets to logout of their SSH session, then the idle connection will remain
indefinitely, increasing the potential for someone to gain privileged access to the host. The
ESXiShellInteractiveTimeOut allows you to automatically terminate idle shell sessions.

Solution

From the vSphere web client-

1. Select the host.
2. Click 'Manage' -> 'Settings' -> 'System' -> 'Advanced System Settings'.
3. Type ESXiShellInteractiveTimeOut in the filter.
4. Click on the attribute to highlight it.
5. Click the pencil icon to edit.
6. Set the attribute to the desired value (300 or less).
7. Click 'OK'.Note- A value of 0 disables the ESXi ShellInteractiveTimeOut.Additionally, the following PowerCLI command will implement the recommended
configuration state-# Set Remove UserVars.ESXiShellInteractiveTimeOut to 300 on all hosts
Get-VMHost | Foreach { Set-VMHostAdvancedConfiguration -VMHost $_ -Name
UserVars.ESXiShellInteractiveTimeOut -Value 300 }

Default Value-The prescribed state is not the default state.

See Also

https://workbench.cisecurity.org/files/145

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-12, CSCv6|16.4

Plugin: VMware

Control ID: 7a2324b6adf280f0c72419d5c4ef8b72599038e8d73dde1072edc88e9c8abbb5