Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
B #223: Generate SSH host keys with ssh-keygen -A
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlastimil Holer committed Mar 29, 2021
1 parent bb2df2a commit 07f8483
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/etc/one-context.d/loc-24-ssh_host_key##deb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 07f8483

Please sign in to comment.