HEX
Server: Apache
System: Linux resolve-developments-ubuntu-s-8vcpu-16gb-amd-lon1-01 5.15.0-113-generic #123-Ubuntu SMP Mon Jun 10 08:16:17 UTC 2024 x86_64
User: www-data (33)
PHP: 8.3.29
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