Changeset e5e4cd4 in bootscripts-standard


Ignore:
Timestamp:
Jun 13, 2009, 5:32:11 PM (13 years ago)
Author:
Joe Ciccone <jciccone@…>
Branches:
master
Children:
c712058
Parents:
a483775
Message:

Generate the ssh host keys when the service starts if they dont already exist. This helps cross-compiling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cblfs/init.d/sshd

    ra483775 re5e4cd4  
    1515case "$1" in
    1616    start)
     17        if [ ! -f /etc/ssh/ssh_host_key ]; then
     18          boot_mesg "Generating /etc/ssh/ssh_host_key"
     19          ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N ""
     20          evaluate_retval
     21        fi
     22        if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
     23          boot_mesg "Generating /etc/ssh/ssh_host_dsa_key"
     24          ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ""
     25          evaluate_retval
     26        fi
     27        if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
     28          boot_mesg "Generating /etc/ssh/ssh_host_rsa_key"
     29          ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""
     30          evaluate_retval
     31        fi
     32
    1733        boot_mesg "Starting SSH Server..."
    1834        # Also prevent ssh from being killed by out of memory conditions
Note: See TracChangeset for help on using the changeset viewer.