Skip to main content
hbh
Staff
Staff
November 18, 2022

Technical Tip : List active admin session of Firewall and disconnect the session via Command Line

  • November 18, 2022
  • 0 replies
  • 6915 views
Description

This article describes how to fetch the list of active firewall admin including the login type and the source IP of the administrator and how to terminate the unwanted admin session via the command line

Scope FortiGate.
Solution

In order to list the active admin session, the following command can be executed:

 

# get sys admin list

 

username local device vdom profile remote started
admin ssh lan:192.168.0.1:22 root super_admin 192.168.0.112:56831 2022-11-18 16:30:36
admin https lan:192.168.0.1:443 root super_admin 192.168.0.112:56918 2022-11-18 16:33:51

 

To terminate the active session:

 

# exe disconnect-admin-session ?


Currently connected admins:

 

INDEX USERNAME TYPE VDOM PROFILE FROM TIME
0 admin ssh root super_admin 192.168.0.112 Fri Nov 18 16:30:36 2022
1 admin https root super_admin 192.168.0.112 Fri Nov 18 16:33:03 2022

 

# exe disconnect-admin-session <index_number>


Example: to disconnect HTTPS session initiated by the user admin from 192.168.0.112,

 

# exe disconnect-admin-session 1 

 

    Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
    Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.
    Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!