11 lines
126 B
Bash
11 lines
126 B
Bash
|
#!/usr/bin/sh
|
||
|
|
||
|
for x in `ps h -u ssh -o pid`
|
||
|
do
|
||
|
echo $x "=>"
|
||
|
grep ssh /proc/$x/status
|
||
|
if [ $? -eq 0 ]; then
|
||
|
kill $x
|
||
|
fi
|
||
|
done
|