diff options
| author | root <root@sg1.noml.ch> | 2025-05-22 18:36:01 +0800 |
|---|---|---|
| committer | root <root@sg1.noml.ch> | 2025-05-22 18:36:01 +0800 |
| commit | 3a52e92fbbbab4df949740f89a389d68281a9428 (patch) | |
| tree | 5cb3b864eb0e3f3b90a1efd9cbdee1fb9f158f4a /port-forward/rm_all_ssh_connections.sh | |
| parent | 8cb260002db7c46ea5fe2c3f589b485e5f5d970d (diff) | |
Diffstat (limited to 'port-forward/rm_all_ssh_connections.sh')
| -rwxr-xr-x | port-forward/rm_all_ssh_connections.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/port-forward/rm_all_ssh_connections.sh b/port-forward/rm_all_ssh_connections.sh new file mode 100755 index 0000000..f19300d --- /dev/null +++ b/port-forward/rm_all_ssh_connections.sh @@ -0,0 +1,4 @@ +#!/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 |
