From 573cc3fc4763df1e1ee76f7cf4e1b864e559a254 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Mon, 10 Jun 2024 03:37:12 +0800 Subject: [PATCH] Update rhel.sh --- scripts/install/rhel.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install/rhel.sh b/scripts/install/rhel.sh index 975e784f8..7b69422ef 100644 --- a/scripts/install/rhel.sh +++ b/scripts/install/rhel.sh @@ -48,6 +48,8 @@ if [ ! -d /root/.acme.sh ];then curl https://get.acme.sh | sh fi +yum install -y net-tools + SSH_PORT=`netstat -ntpl|grep sshd|grep -v grep | sed -n "1,1p" | awk '{print $4}' | awk -F : '{print $2}'` if [ "$SSH_PORT" == "" ];then SSH_PORT_LINE=`cat /etc/ssh/sshd_config | grep "Port \d*" | tail -1`