2N/A# Copyright 2010 Sun Microsystems, Inc. All rights reserved. 2N/A# Use is subject to license terms. 2N/A# Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> 2N/A# Checks to see if RSA, and DSA host keys are available 2N/A# if any of these keys are not present, the respective keys are created. 2N/A # HostKey keywords in sshd_config may be preceded or 2N/A # followed by a mix of any number of space or tabs, 2N/A # and optionally have an = between keyword and 2N/A # argument. We use two grep invocations such that we 2N/A # can match HostKey case insensitively but still have 2N/A # the case of the path name be significant, keeping 2N/A # the pattern somewhat more readable. 2N/A # The character classes below contain one literal 2N/A # 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 }"