Logo: Leibniz Universität Hannover

Startup-Script

#! /bin/sh

#

# start/stop the secure shell deamon

case "$1" in

'start')

# Start the audit deamon

if [ -f /usr/local/sbin/sshd ]; then

echo "starting SSHD daemon"

/usr/local/sbin/sshd &

fi

;;

'stop')

# Stop the audit 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} 1>/dev/null 2>&1

echo "stopping SSHD daemon"

fi

;;

esac

Prinzipiell auch über inetd.conf. Wird nicht empfohlen.

Leibniz Universität IT Services - URL: www.rrzn.uni-hannover.de/ssh_startup.html
 
mq, Letzte Änderung: 02.02.2005
Copyright Gottfried Wilhelm Leibniz Universität Hannover