diff --git a/protected_resources/scripts/install-config-ssh.sh b/protected_resources/scripts/install-config-ssh.sh index ac7cc01..9ffcccf 100644 --- a/protected_resources/scripts/install-config-ssh.sh +++ b/protected_resources/scripts/install-config-ssh.sh @@ -1,10 +1,11 @@ #!/bin/bash -if which ssh >/dev/null 2>&1; then - echo "SSH is installed" - exit 1 +# check if ssh is installed +if ! command -v ssh &>/dev/null; then + echo "SSH is not installed" else - echo "SSH is not installed" + echo "SSH is already installed" + exit 1 fi if lsb_release -a 2>/dev/null | grep -q -E "Debian|Ubuntu"; then