> On Wed, 31 Oct 2001, Foerst, Daniel P. wrote:
>
> Not looking to use openssh.
> The powers that be declared SSH to be used.
>
> And if not xinetd, then how do I setup this service ?
>
> Thanks!
>
> -dan
I've just used it with rc.d. I attached my /etc/rc.d/init.d/ssh2
script. They you should be able to type 'service ssh2 start', or
enable/disable it on startup with chkconfig. No guarantees on the script,
though. I just made it for my own use.
David
#!/bin/sh
#
# chkconfig: 345 76 24
#
# Sorce 'em up
. /etc/rc.d/init.d/functions
SSHD=/usr/local/sbin/sshd
PID=/var/run/sshd2_22.pid
case "$1" in
start)
if [ -e $PID ]; then
action "Stopping sshd2" kill -9 `cat $PID 2>/dev/null`
rm -f $PID
fi
action "Starting sshd2" $SSHD
;;
stop)
if [ ! -r $PID ]; then
action "Stopping sshd2" false
else
action "Stopping sshd2" kill -9 `cat $PID`
rm -f $PID
fi
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0