From 3a52e92fbbbab4df949740f89a389d68281a9428 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 22 May 2025 18:36:01 +0800 Subject: hehe --- port-forward/rm_all_ssh_connections.sh | 4 ++++ port-forward/ssh-port-forward.sh | 2 ++ 2 files changed, 6 insertions(+) create mode 100755 port-forward/rm_all_ssh_connections.sh (limited to 'port-forward') 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 diff --git a/port-forward/ssh-port-forward.sh b/port-forward/ssh-port-forward.sh index b549560..4483ef4 100755 --- a/port-forward/ssh-port-forward.sh +++ b/port-forward/ssh-port-forward.sh @@ -1,5 +1,7 @@ #!/bin/bash +# opens 5 ports + #file will be run from where the user executes the script j=$1 HOST="root@p.0nom.ch" -- cgit v1.2.3-70-g09d2