Skip to content

Quick Tip: Remove NSX-T SSH and HTTP Session Timeout

If you are like me and keep browser tabs and SSH sessions open forever, I guess you are annoyed when that happens:

Default timeouts in NSX-T are:

  • 1800 seconds (30 minutes) for the Web Interface
  • 600 seconds (10 minutes) for SSH

This article explains how to remove session timeouts for SSH and the Web interface in NSX-T to stay logged in forever.

Remove SSH Session Timeout

  1. Connect to the NSX-T Manager with SSH
  2. Login as admin
  3. Run set cli-timeout 0

    nsx-mgt1> set cli-timeout 0
    
  4. Verify SSH Timeout with get cli-timeout
    nsx-mgt1> get cli-timeout
    Timeout disabled

Remove HTTP (Web Interface) Session Timeout

  1. Connect to the NSX-T Manager with SSH
  2. Login as admin
  3. Run set service http session-timeout 0

    nsx-mgt1> set service http session-timeout 0
    
  4. Restart the HTTP Service
    nsx-mgt1> restart service ui-service
  5. Verify HTTP Timeout with get service http
    nsx-mgt1> get service http
    Service name:                     http
    Service state:                    running
    Logging level:                    info
    Session timeout:                  0
    Connection timeout:               30
    Client API rate limit:            100 requests/sec
    Client API concurrency limit:     40 connections
    Global API concurrency limit:     199 connections
    Redirect host:                    (not configured)
    Basic authentication:             enabled
    Cookie-based authentication:      enabled

 

Tags:

3 thoughts on “Quick Tip: Remove NSX-T SSH and HTTP Session Timeout”

  1. This seems to work for the NSX Manager CLI but not for SSH. My SSH sessions on 2.5.1 all time out ridiculously quickly.

    It might be specific to that version, though.

    I think I will try to set up SSH keys and run commands from a host without the timeout problems (i.e., ssh nsx-mgr-host get services).

    1. When it's the cli timeout it should end the session with "% Exiting due to inactivity". Maybe you can look after that message.

  2. Okay, it might have something to do with the terminal used. I have set the CLI timeout. When I log into NSX Manager using putty, my session times out after ridiculously brief periods of inactivity.

    Logging in from a Linux host (using an SSH key, which may or may not make a difference), though, my inactive session stays open while I answer email and get a cup of coffee, etc. The Linux host is on the same subnet and my laptop is not, which also might make a difference.

Leave a Reply to Michael G. Cancel reply

Your email address will not be published. Required fields are marked *