How to change or disable your VMware vSphere Client default inactivity timeout

Posted by Paul Braren on Jun 10 2020 (updated on Jun 11 2020) in
  • ESXi
  • HowTo
  • HomeLab
  • HomeServer
  • Virtualization
  • VMUGAdvantage
  • vSphere7
  • putty-session-commands--TinkerTry
    vi-edit--TinkerTry

    Maybe you're a demo master, and you want to conquer your private lab and show it whose boss. You're sick and tired of fat-fingering that dang adminstrator@vsphere.local username then password into your vSphere Client at the most inopportune times, especially if you (wisely) didn't use your browser's built-in password save feature. Maybe you staged a live demo more than 2 hours before you're set to take center stage on a Zoom web meeting, only to find your vSphere Client browser session has logged off just after you share your screen with everybody. Worry no more!

    vSphere-Client-login--TinkerTry

    Like the notion of lengthening or even disabling the timeout? How about changing the default value of 120 minutes to something like:

    • 480 minutes (8 hours)
    • 1440 minutes (24 hours)
    • 2880 minutes (48 hours)
    • 10080 minutes (7 days)
    • 0 minutes (Never)

    This step-by-step article with walk through video below has you covered. Gone are the days of sweat on your brow before your live demonstrations!

    Warning:: Perform this change in your non-production lab at your own risk. You and you alone are responsible for any harm that may come to your lab as a result of this action that leaves your vSphere cluster wide-open to all sorts of mischief, should somebody find their way onto your network.

    Having easy access to VCSA is especially helpful now that beloved SolarWinds VM Monitor is no longer compatible with vSphere (6.7 or 7.0). Now you're able to check in on your vSphere health a hurry, using a dedicated single-click Chrome shortcut to your VCSA appliance.

    Step-by-Step

    enable-bash-shell-using-VAMI--TinkerTry
    Use VAMI to Enable SSH Login to VCSA.
    1. SSH to your VCSA 7.x appliance
      If you don't have SSH access enabled, temporarily turn it on by following along by using VAMI, which in my lab meant browsing to https://vcsa.lab.localhost:5480

    2. Type your credentials, root username and password

    3. You likely don't have BASH shell active by default, so when prompted, just type:

      shell
    4. You'll now see a command like this
      root@vcsa [ ~ ]#

    5. Next, you'll want to make a copy of the webclient.properties file before editing it, so you can roll-back in case you mess up. It's best to copy-and-paste the following 2 commands into your SSH session, one-line-at-a-time:

      cp /etc/vmware/vsphere-ui/webclient.properties /etc/vmware/vsphere-ui/webclient.properties.orig
      vi /etc/vmware/vsphere-ui/webclient.properties
    6. Now that you're inside the VI editor, press your i key to go into edit mode, then down-arrow until around the 16th line of code where you'll find:

      session.timeout = 120
    7. Change the value from 120 (seconds) to 0 (never), or some other value of your choosing:

      session.timeout = 0
    8. To exit the VI editor and save your changes, press ESC key, then type :wq then hit Enter

      <ESC>
      :wq
    9. Verify the change has been made, with this simple way to show just the line you're interested in in the file you just edited, and one line above for context . Just paste this one line in:

      cat /etc/vmware/vsphere-ui/webclient.properties | grep "session.timeout"
    10. You may now close your SSH window.

      SSH-Login-disabled--TinkerTry
      Optional - use VAMI to Disable SSH Login to VCSA.

      You can type exit twice, or just close the window.

    11. Optional - Disable SSH access to your VCSA 7.x appliance
      If you prefer to not have SSH left open, it's easiest to just use VAMI again to make the change.

    12. Restart VMware vSphere Client
      Easiest to just use VAMI to do this step, shown below. Select Services, scroll down to find VMware vSphere Client, then press the RESTART button and wait for a while for it to finish before proceeding, mine takes about 10 seconds. This is disruptive in that it will bump any logged in users off. When it's done, it show as Healthy / Started.

      VAMI-VMware-vSphere-Client-restart--TinkerTry
    13. Log in to vSphere Client
      Since you've restarted the vSphere Client service, if you had any existing vSphere Client web windows still open, you'll find they may have been logged off, just log in if needed, and you're all set.

    That's it, enjoy your latest TinkerTry Tip! Speaking of tips, a tip of the hat is owed to Vladen Seget who documented this procedure for vSphere 6.7, see How To Disable vSphere Web Client Inactivity Timeout, based on the original VMware KB 2040626.

    Video

    TinkerTry - Jun 10 2020 - How to change or disable your VMware vSphere Client default inactivity timeout

    See also at TinkerTry

    All vSphere 7 articles.

    All vSphere 7 videos.


    See also

    disable-vsphere-web-client-inactivity-timeout

    2040626