HEX
Server: nginx/1.24.0
System: Linux ns3374112 6.8.0-106-generic #106-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 6 07:58:08 UTC 2026 x86_64
User: root (0)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: //lib/openssh/ssh-session-cleanup
#! /bin/sh

ssh_session_pattern='sshd: \S.*@pts/[0-9]+'

IFS="$IFS@"
pgrep -a -f "$ssh_session_pattern" | while read pid daemon user pty; do
	echo "Found ${daemon%:} session $pid on $pty; sending SIGTERM"
	kill "$pid" || true
done

exit 0