Support Support Downloads Knowledge Base Juniper Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[Junos] Options to logout sessions



Article ID: KB36232 KB Last Updated: 15 Oct 2020Version: 2.0
This article discusses the different options to logout sessions manually, with a specific scenario where the same user is logged in simultaneous sessions.

Sessions can logout/close on the basis of PID [process ID], terminal or username. All users can also logout together using the 'all' option. These options are mentioned below: 

root@device> request system logout ?
Possible completions:
  <[Enter]>            Execute this command
  all                  Logout all sessions owned by user
  pid                  Management process ID for user
  terminal             Terminal user is logged in to
  user                 Name of user
  |                    Pipe through a command

Sometimes, the same user may open simultaneous multiple sessions. These sessions share the same username. The fastest method to logout these sessions is using the 'terminal' option.


  1. Get the list of active sessions logged-in to the SRX using the command 'show system users'. Then select the terminal session you want to logout manually. 

    root@device> show system users                       
     8:11PM  up 16 days,  9:11, 4 users, load averages: 7.35, 7.19, 7.36
    USER     TTY      FROM                              LOGIN@  IDLE WHAT
    root     v0       -                                29Aug20 7days cli           
    root     pts/0                    8:11PM      - -cs           
    root     pts/1                    8:09PM      - cli           
    root     pts/2                    8:09PM      2 cli           
  2. Notice the TTY value for the session to manually logout. The session is logged out using the command 'request system logout terminal <TTY Value>'. 

    root@device> request system logout terminal pts/0 
    logout-user: done
  3. The selected session is logged out.

     root@device> show system users                       
     8:16PM  up 16 days,  9:16, 3 users, load averages: 7.56, 7.29, 7.34
    USER     TTY      FROM                              LOGIN@  IDLE WHAT
    root     v0       -                                29Aug20 7days cli           
    root     pts/1                    8:09PM      - cli           
    root     pts/2                    8:09PM      6 cli 

This is applicable to all Junos devices. For further details, refer to the command reference guide for request system logout.
Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search