The ESXi Shell supports a timeout for ESXi Shell availability and a timeout for idle ESXi Shell sessions.
You can set both timeout values from the Direct Console User Interface or from the vSphere Web Client. See the vSphere Security document for detailed instructions.