Log a User Out of the Device
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:
user@host> request system logout user usernameuser@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.