-
Notifications
You must be signed in to change notification settings - Fork 51
hangup
Ulrich Berntien edited this page Mar 24, 2019
·
1 revision
hangup - terminate someones PTS by killing their SSHD process.
hangup PTS-NUMBER+ | hangup all [other]
hangup terminates someones PTS by killing their SSH daemon process. The function checks the given number by stat /dev/pts/number.
The arguments are:
- PTS-NUMBER: Number of the PTS to hangup. The SSHD process hosting this PTS will be terminated. A single PTS number or a space separated list of PTS numbers is allowed.
- all: Instead of a PTS number list the keyword all could be used to terminate all SSH processes hosting PTS sessions. “all other” will hangup all PTS sessions but not our current session. The current shell must have the right to send a kill signal (signal 9) to the SSHD process hosting the connection.
Terminate SSHD process hosting /dev/pts/3:
$ hangup 3
Terminate SSHD process hosting /dev/pts/4 and SSH process hosting /dev/pts/7:
$ hangup 4 7
Terminate all SSHD process hosting /dev/pts/* but not our SSH process:
$ hangup all other
Terminate all SSHD process hosting an /dev/pts/* connection:
$ hangup all