/usr/bin/sftp-kill is in mysecureshell 2.0-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #!/bin/sh
[ $1 ] || {
echo "
Usage: $0 [username]
username: specify the user name to kill or enter all to kill all"
exit 0
}
sftp-who --sftp-kill |
while read pid who; do
shot=1
[ x$1 = xall ] || [ x$1 = x$who ] && {
echo Kill $who on PID $pid
kill -HUP $pid
}
done
[ $shot ] || echo 'No lamer to kill ?'
|