summaryrefslogtreecommitdiffstats
path: root/opensshd.init.in
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2021-08-20 10:14:13 +0200
committerDarren Tucker <dtucker@dtucker.net>2021-08-20 10:14:13 +0200
commit95401eea8503943449f712e5f3de52fc0bc612c5 (patch)
tree0c429cfd9593d2ef2f502f9f4bf84450ffd47930 /opensshd.init.in
parentRemove obsolete Redhat PAM config and init script. (diff)
downloadopenssh-95401eea8503943449f712e5f3de52fc0bc612c5.tar.xz
openssh-95401eea8503943449f712e5f3de52fc0bc612c5.zip
Replace shell function with ssh-keygen -A.
Prevents the init script in the SysV package from trying (and failing) to generate unsupported key types. Remove now-unused COMMENT_OUT_ECC. ok tim@
Diffstat (limited to 'opensshd.init.in')
-rwxr-xr-xopensshd.init.in22
1 files changed, 1 insertions, 21 deletions
diff --git a/opensshd.init.in b/opensshd.init.in
index 99e5a51ab..251724805 100755
--- a/opensshd.init.in
+++ b/opensshd.init.in
@@ -17,26 +17,6 @@ PIDFILE=$piddir/sshd.pid
PidFile=`grep "^PidFile" ${sysconfdir}/sshd_config | tr "=" " " | awk '{print $2}'`
[ X$PidFile = X ] || PIDFILE=$PidFile
SSH_KEYGEN=$prefix/bin/ssh-keygen
-HOST_KEY_DSA=$sysconfdir/ssh_host_dsa_key
-HOST_KEY_RSA=$sysconfdir/ssh_host_rsa_key
-@COMMENT_OUT_ECC@HOST_KEY_ECDSA=$sysconfdir/ssh_host_ecdsa_key
-HOST_KEY_ED25519=$sysconfdir/ssh_host_ed25519_key
-
-
-checkkeys() {
- if [ ! -f $HOST_KEY_DSA ]; then
- ${SSH_KEYGEN} -t dsa -f ${HOST_KEY_DSA} -N ""
- fi
- if [ ! -f $HOST_KEY_RSA ]; then
- ${SSH_KEYGEN} -t rsa -f ${HOST_KEY_RSA} -N ""
- fi
-@COMMENT_OUT_ECC@ if [ ! -f $HOST_KEY_ECDSA ]; then
-@COMMENT_OUT_ECC@ ${SSH_KEYGEN} -t ecdsa -f ${HOST_KEY_ECDSA} -N ""
-@COMMENT_OUT_ECC@ fi
- if [ ! -f $HOST_KEY_ED25519 ]; then
- ${SSH_KEYGEN} -t ed25519 -f ${HOST_KEY_ED25519} -N ""
- fi
-}
stop_service() {
if [ -r $PIDFILE -a ! -z ${PIDFILE} ]; then
@@ -54,7 +34,7 @@ start_service() {
# XXX we will opt out at this time. - Bal
# Check to see if we have keys that need to be made
- checkkeys
+ ${SSH_KEYGEN} -A
# Start SSHD
echo "starting $SSHD... \c" ; $SSHD