#!/bin/bash ss -tnp | grep ':22' ps -ef | grep sshd | grep -v grep | awk '{if($3!=1) print $2}' | xargs kill #sudo systemctl restart sshd