B #223: Generate SSH host keys with ssh-keygen -A

pull/225/head
Vlastimil Holer 4 years ago
parent bb2df2ab2c
commit d847784380

@ -17,6 +17,11 @@
#--------------------------------------------------------------------------- #
if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure openssh-server
if ssh-keygen -A; then
if type restorecon >/dev/null 2>&1; then
restorecon -R -v /etc/ssh/
fi
else
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure openssh-server
fi
fi

Loading…
Cancel
Save