1
0
Fork 0

No SSH host keys in image, generate at startup

This commit is contained in:
Braiden Vasco 2017-07-06 03:37:44 +00:00
parent 1c44f5770d
commit ce242b5226
2 changed files with 19 additions and 0 deletions

View file

@ -211,6 +211,21 @@ EOF
apply_patch '01-no-root-login.diff'
rm -fv '/etc/ssh/ssh_host_key'
rm -fv '/etc/ssh/ssh_host_key.pub'
rm -fv '/etc/ssh/ssh_host_dsa_key'
rm -fv '/etc/ssh/ssh_host_dsa_key.pub'
rm -fv '/etc/ssh/ssh_host_ecdsa_key'
rm -fv '/etc/ssh/ssh_host_ecdsa_key.pub'
rm -fv '/etc/ssh/ssh_host_ed25519_key'
rm -fv '/etc/ssh/ssh_host_ed25519_key.pub'
rm -fv '/etc/ssh/ssh_host_rsa_key'
rm -fv '/etc/ssh/ssh_host_rsa_key.pub'
##
# ?????
#

View file

@ -14,4 +14,8 @@
# Increase root file system size to take all available space.
resize2fs "$(findmnt / -o source -n)"
# Generate the default host keys for each of the key types
# for which host keys do not exist (rsa1, rsa, dsa, ecdsa and ed25519).
ssh-keygen -A
exit 0