Skip to content
Ulrich Berntien edited this page Mar 24, 2019 · 1 revision

hangup

Name

hangup - terminate someones PTS by killing their SSHD process.

Synopsis

hangup PTS-NUMBER+ | hangup all [other]

Description

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.

Examples

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
Clone this wiki locally