#!/bin/bash set -e # Check if SSH daemon is running if pgrep -x sshd > /dev/null; then exit 0 else echo "SSH daemon is not running" exit 1 fi