diff options
| author | Super User <root@p.noml.ch> | 2026-03-23 19:09:37 +0800 |
|---|---|---|
| committer | Super User <root@p.noml.ch> | 2026-03-23 19:09:37 +0800 |
| commit | c332cf11dc0266f31eeae067ace5a9bda18122c6 (patch) | |
| tree | e4934d0f83aa1c7138e9b22efea97d5bf67ad905 /port-forward/rm_all_ssh_connections.sh | |
| parent | dea4663f14bcb1703aa616ad05172667e452e701 (diff) | |
flatten setup directory structure
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 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | ss -tnp | grep ':22' | ||
| 3 | ps -ef | grep sshd | grep -v grep | awk '{if($3!=1) print $2}' | xargs kill | ||
| 4 | #sudo systemctl restart sshd | ||
