Hi,
I am not sure why but i get a feeling that the group thinks i posted my pre
last question (i deleted my start-up script; help?!) without actually
deleting it. and now i have a funny feeling no one wants to help me out b/c
of that.
well, i am sorry if i gave off such an impression, but i did honestly
deleted the script. and i am a newbie in scripting, and i can't write my own
yet. that's why i asked for your help, not because i didn't want to write
one.
thank you everybody for your help,
avm
> i am using sshd2: SSH Secure Shell 3.0.1 (non-commercial version) on
> i586-pc-linux-gnu
> and everytime i start the daemon it works until the initial connection to
> it terminates, with which the daemon exits as well. so it's connect ones,
> restart the daemon.what am i doing wrong this time?
> here is the /etc/rc.d/init.d/sshd file:
>
> #!/bin/sh
> #
> # /etc/rc.d/init.d/sshd -- start/stop the ssh daemon.
> PATH=/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/bin:/usr/bin
>
> # Source function library.
> . /etc/rc.d/init.d/functions
>
> # Determine the port daemon wants to use
> PORT=`grep Port /etc/ssh2/sshd2_config | awk '{x = $2} END {print x}' -`
>
> # If Port field is empty fall back to default -> 22
> if [ "X$PORT" = "X" ]; then
> PORT = 22
> fi
>
> RETVAL=0
>
> case "$1" in
> start)
> if [ -x /usr/local/sbin/sshd ]; then
> echo -n "Starting SSH Daemon (sshd2) on port $PORT ..."
> daemon /usr/local/sbin/sshd &
> RETVAL=$?
> [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sshd2_$PORT
> echo
> fi
> ;;
> stop)
> echo -n "Shutting Down SSH Daemon (sshd2) on Port $PORT ..."
> kill -TERM `cat /var/run/sshd2_$PORT.pid`
> RETVAL=$?
> [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sshd2_$PORT
> echo
> ;;
> restart|force-reload)
> $0 stop >/dev/null
> sleep 2 && echo "sshd2 is comming back on-line on port $PORT
> ..."
> $0 start >/dev/null
> ;;
> status)
> status sshd
> RETVAL=$?
> ;;
> *)
> echo "Usage: sshd {start|stop|restart|force-reload|status}"
> RETVAL=1
> ;;
> esac
> exit $RETVAL
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]