From 58f75cd799cefa86a378a78599710de0099cb86a Mon Sep 17 00:00:00 2001 From: hc Date: Wed, 2 Oct 2024 11:15:50 +0800 Subject: added ssh agrent forwarding --- others/reset-ssh-connections.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 others/reset-ssh-connections.sh (limited to 'others/reset-ssh-connections.sh') 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 -- cgit v1.2.3-70-g09d2