HEX
Server: Apache
System: Linux server3230.server-vps.com 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64
User: lzgqnjwu (1002)
PHP: 7.4.33
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