3 # sshd sshd (secure shell daemon)
7 # description: sshd (secure shell daemon) is a server part of the ssh suite.
8 # Ssh can be used for remote login, remote file copying, TCP port
9 # forwarding etc. Ssh offers strong encryption and authentication.
12 # Source function library
13 . /etc/rc.d/init.d/functions
16 . /etc/sysconfig/network
19 [ -f /etc/sysconfig/sshd ] && . /etc/sysconfig/sshd
21 # Check that networking is up.
22 if [ "${NETWORKING}" = "no" ]; then
23 echo "WARNING: Networking is down. Sshd can't be runed."
28 # See how we were called.
31 # Check if the service is already running?
32 if [ ! -f /var/lock/subsys/sshd ]; then
33 show Starting OpenSSHd
34 daemon sshd -h /etc/ssh/ssh_host_key
36 echo "OpenSSHd already is running"
38 touch /var/lock/subsys/sshd
41 show Stopping OpenSSHd
43 rm -f /var/run/sshd.pid
44 rm -f /var/lock/subsys/sshd
54 echo "Usage: $0 {start|stop|status|restart|reload}"