diff options
| author | hc <hc@email.ch> | 2024-10-02 11:15:50 +0800 |
|---|---|---|
| committer | hc <hc@email.ch> | 2024-10-02 11:15:50 +0800 |
| commit | 58f75cd799cefa86a378a78599710de0099cb86a (patch) | |
| tree | 42e11c53acb2e1414efe5e6a64380ef589f31dea /others/reset-ssh-connections.sh | |
| parent | 809a9229b68f4b1385915c152a49e69ebee963a7 (diff) | |
added ssh agrent forwarding
Diffstat (limited to 'others/reset-ssh-connections.sh')
| -rwxr-xr-x | others/reset-ssh-connections.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/others/reset-ssh-connections.sh b/others/reset-ssh-connections.sh new file mode 100755 index 0000000..f19300d --- /dev/null +++ b/others/reset-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 |
