case "$1" in 'start') # Start the ssh daemon if [ -f /usr/local/sbin/sshd ]; then echo "starting SSHD daemon" /usr/local/sbin/sshd & fi ;; 'stop') # Stop the ssh deamon PID=`/usr/bin/ps -e -u 0 | /usr/bin/fgrep sshd | /usr/bin/awk '{print $1}'` if [ ! -z "$PID" ] ; then /usr/bin/kill ${PID} >/dev/null 2>&1 echo "stoping SSHD daemon" fi ;; *) echo "usage: /etc/init.d/sshd {start|stop}" ;; esac exit 0