If you ever want to terminate all active ssh sessions you can use this command (assuming that only ssh is connected to port 22):
kill `sudo lsof -Pni :22 | tail -n1 | grep -wv sshd | awk '{print $2}'`
This command finds all processes connected on port 22, removes the banner of lsof
command output, ignores the ssh daemon process and gets all the PIDs, then terminates those PIDs.