Page MenuHomeVyOS Platform

Ability to terminate user TTY and PTS sessions
Closed, ResolvedPublicFEATURE REQUEST

Description

Ability to terminate user TTY and PTS sessions
We can see users, but cannot terminate them

vyos@r14:~$ show users 
NAME     LINE         TIME             COMMENT
vyos     tty1         2022-09-26 18:40
vyos     pts/0        2022-09-26 15:49 (192.168.122.1)
vyos     pts/1        2022-09-26 18:35 (192.168.122.1)
vyos@r14:~$

We can use pkill

vyos@r14:~$ pkill -9 -t pts/1
vyos@r14:~$ 
vyos@r14:~$ show users 
NAME     LINE         TIME             COMMENT
vyos     tty1         2022-09-26 18:40
vyos     pts/0        2022-09-26 15:49 (192.168.122.1)
vyos@r14:~$

And with "sudo" for tty

vyos@r14:~$ sudo pkill -9 -t tty1
vyos@r14:~$ 
vyos@r14:~$ show users 
NAME     LINE         TIME             COMMENT
vyos     pts/0        2022-09-26 15:49 (192.168.122.1)
vyos@r14:~$ 
vyos@r14:~$

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Feature (new functionality)

Related Objects

Event Timeline

PR https://github.com/vyos/vyos-1x/pull/1562

vyos@r14:~$ show users 
NAME     LINE         TIME             COMMENT
vyos     pts/0        2022-09-27 15:23 (192.168.122.1)
vyos     pts/1        2022-09-27 15:23 (192.168.122.1)
vyos@r14:~$ 
vyos@r14:~$ clear session 
Possible completions:
  pts/0                 Terminate TTY or PTS user session
  pts/1


vyos@r14:~$ clear session pts/1
vyos@r14:~$ 
vyos@r14:~$ show users
NAME     LINE         TIME             COMMENT
vyos     pts/0        2022-09-27 15:23 (192.168.122.1)
vyos@r14:~$
Viacheslav changed the task status from Open to In progress.Sep 27 2022, 12:29 PM
Viacheslav claimed this task.
Viacheslav moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.