home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- . /etc/init.d/functions
-
-
- case "$1" in
- start|--start)
- if [ ! -e /etc/ssh_host_dsa_key ] ; then
- ssh-keygen -t dsa -N "" -f /etc/ssh_host_dsa_key
- fi
- if [ ! -e /etc/ssh_host_rsa_key ] ; then
- ssh-keygen -t rsa -N "" -f /etc/ssh_host_rsa_key
- fi
- if [ ! -e /etc/ssh_host_key ] ; then
- ssh-keygen -t rsa1 -N "" -f /etc/ssh_host_key
- fi
-
- /usr/sbin/sshd
- ;;
-
-
- stop|--stop)
- pkill sshd
- ;;
-
- *)
- echo "Usage: openssh {start|stop}" >&2
- exit 2
- esac
-
- exit 0
-