On Sat, 8 Jul 2000, nikhil wrote:
> how can i make sshd start during bootup.i tried to make a sym. link to
> /etc/rc.d/init.d but it says too many levels of sym. links.
Sounds like you're using Linux, so try this script (make sure the path
is right, install it in /etc/rc.d/init.d, then run "chkconfig --add
sshd" if this is Red Hat Linux).
--
Dave Dittrich Computing & Communications
[EMAIL PROTECTED] Client Services
http://staff.washington.edu/dittrich University of Washington
PGP key http://staff.washington.edu/dittrich/pgpkey.txt
Fingerprint FE 97 0C 57 08 43 F3 EB 49 A1 0C D0 8E 0C D0 BE C8 38 CC B5
#!/bin/sh
#
# chkconfig: 345 55 45
# description: sshd (secure shell daemon) is a server part of the ssh suite.
# Ssh can be used for remote login, remote file copying, TCP port
# forwarding etc. Ssh offers strong encryption and authentication.
#
# Source function library.
. /etc/rc.d/init.d/functions
# See how we were called.
case "$1" in
start)
echo -n "Starting sshd: "
if test -r /var/run/sshd.pid && kill -0 `cat /var/run/sshd.pid`
then echo "already running according to /var/run/sshd.pid. Not started."
else /usr/local/sbin/sshd
echo sshd
fi
touch /var/lock/subsys/sshd
;;
stop)
echo -n "Stopping sshd: "
[ -f /var/run/sshd.pid ] || exit 0
kill -TERM `cat /var/run/sshd.pid`
rm -f /var/run/sshd.pid
rm -f /var/lock/subsys/sshd
echo "sshd"
;;
restart)
$0 stop
$0 start
;;
status)
status sshd
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
esac
exit 0