From 019cfd64647019cba5d67e7802450a03598f05ad Mon Sep 17 00:00:00 2001 From: silversword411 Date: Sun, 29 Oct 2023 14:43:04 -0400 Subject: [PATCH] From Discord #scripts Thanks Stefan! --- scripts_wip/linux_sshserver_check.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 scripts_wip/linux_sshserver_check.sh diff --git a/scripts_wip/linux_sshserver_check.sh b/scripts_wip/linux_sshserver_check.sh new file mode 100644 index 00000000..315ee6b3 --- /dev/null +++ b/scripts_wip/linux_sshserver_check.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +# +# With love from Stefan Lousberg 10/29/2023 +# + +SSH_STATUS=$(systemctl is-active sshd) + +if [ "$SSH_STATUS" == "active" ]; then + echo "SSH server (sshd) is running" + exit 0 +else + echo "SSH server (sshd) is not running" + exit 1 +fi