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 is_no "${NETWORKING}"; then
23 msg_Network_Down OpenSSH
28 # See how we were called.
31 # Check if the service is already running?
32 if [ ! -f /var/lock/subsys/sshd ]; then
34 daemon sshd -h /etc/ssh/ssh_host_key
36 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sshd
38 msg_Already_Running OpenSSH
42 if [ -f /var/lock/subsys/sshd ]; then
45 rm -f /var/run/sshd.pid /var/lock/subsys/sshd >/dev/null 2>&1
47 msg_Not_Running OpenSSH
60 msg_Usage "$0 {start|stop|status|restart}"