sshd revision 7ddce99911fbb5e44b38ac65e991a22e42267ee9
# Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> # Checks to see if RSA, and DSA host keys are available # if any of these keys are not present, the respective keys are created. # HostKey keywords in sshd_config may be preceded or # followed by a mix of any number of space or tabs, # and optionally have an = between keyword and # argument. We use two grep invocations such that we # can match HostKey case insensitively but still have # the case of the path name be significant, keeping # the pattern somewhat more readable. # The character classes below contain one literal # space and one literal tab. # This script is being used for two purposes: as part of an SMF # sys-unconfig(1M) knows how to remove ssh host keys, so there's # SMF arguments (start and restart [really "refresh"]) # If host keys don't exist when the service is started, create # them; sysidconfig is not run in every situation (such as on echo "Usage: $0 { start | restart }"