SSH Communications Security
Previous Next Up [Contents] [Index]

    About This Document>>
    Introduction to SSH Secure Shell >>
    Configuring SSH Secure Shell >>
    Authentication >>
    Log Messages >>
    Using SSH Secure Shell >>
        Using the Secure Shell Server Daemon (sshd2)>>
            Manually Starting the Secure Shell Server Daemon
            Automatically Starting the Server Daemon at Boot Time
            Operation of the Server Daemon
            Resetting and Stopping the Server Daemon
            Daemon Configuration File and Command-Line Options
            Subsystems
        Using the Secure Shell Client (ssh2)>>
        Using Secure Copy (scp2)
        Using Secure File Transfer (sftp2)
        Using Authentication Agent (ssh-agent2, ssh-add2)
    Tool Syntax>>
    Technical Specifications >>

Automatically Starting the Server Daemon at Boot Time

If you have installed from RPM packages on RedHat or on SuSE, sshd2 is already starting at boot time. The same is true if you have installed from depot on HP-UX.

In the following sections, two different methods for starting the Secure Shell Daemon at boot time are introduced. If neither of these methods work on your system, consult your operating system documentation on how to start services at boot time.

Starting from /etc/rc.d/rc.local

In order to start sshd2 automatically at boot time on System V based operating systems, the startup script sshd2 should be located in the /etc/rc.d/init.d directory, and there should be symbolic links to sshd2 startup script in /etc/rc.d/rc?.d, where "?" is the runlevel. You can either add these links manually or use chkconfig.

Note: chkconfig is only available on RedHat distributions. With SuSE, add the symbolic links manually.

If you want to use chkconfig, check that the first lines in sshd2 are similar to the following:

#!/bin/sh
#
# Author: Sami Lehtinen <sjl@ssh.com>
#
# sshd2    This shell script takes care of starting 
#          and stopping sshd2.
#
# chkconfig: 345 34 70
# description: Secure Shell daemon
#

This means that sshd will be started in runlevels 3, 4 and 5, its starting priority is 34, and its killing priority is 70. You can choose the runlevels and priorities as you want as long as sshd is started after the network is up.

After adding the links manually or giving the command

chkconfig --add sshd2

you should have the links /etc/rc.d/rc?.d, similar to

lrwxrwxrwx 1 root  root  14 Aug 16 10:07  S34sshd -> ../init.d/sshd
lrwxrwxrwx 1 root  root  14 Aug 16 10:07  K70sshd -> ../init.d/sshd

Starting from /etc/rc.local

On BSD based operating systems, you have to add a similar line to the following to the rc.local file in the /etc directory:

echo "Starting sshd2..."; /usr/local/sbin/sshd2

After this, the Secure Shell daemon will start automatically at boot time.

Previous Next Up [Contents] [Index]


[ Contact Information | Support | Feedback | SSH Home Page | SSH Products ]

Copyright © 2003 SSH Communications Security Corp.
All rights reserved.
Copyright Notice