Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Overview for Junos OS
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Log a User Out of the Device

date_range 21-Mar-23

Sometimes you may need to disconnect a user session if it does not terminate after a user logs out, or you may otherwise want to log a user out for some other reason.

To log a user out of all terminal sessions on a router, enter the following Junos OS CLI command:

content_copy zoom_out_map
user@host> request system logout username
content_copy zoom_out_map
user@host> show system users
10:07PM  up 13 days,  1:25, 2 users, load averages: 0.17, 0.05, 0.02
USER     TTY      FROM                              LOGIN@  IDLE WHAT
harry    p0       hpot-lt.cmpy.net                 10:07PM     - -cli (cl
lisa   p1       hpot-lt.cmpy.net                 10:06PM     - -cli (cl

user@host>  request system logout user harry 
user@host>  show system users  
                 
10:07PM  up 13 days,  1:25, 1 user, load averages: 0.24, 0.06, 0.02
USER     TTY      FROM                              LOGIN@  IDLE WHAT
lisa   p1       hpot-lt.cmpy.net                 10:06PM     - -cli (cl

The sample output for the first show system users command shows there were two users on the router, harry and lisa. The request system logout user command was issued to log out user harry. Because there is no output to indicate that harry was logged out, the show system users command was issued again to verify that user harry was actually logged out of the router, while the user lisa remains logged in.

footer-navigation