No SSH host keys in image, generate at startup
This commit is contained in:
parent
1c44f5770d
commit
ce242b5226
15
build.sh
15
build.sh
|
@ -211,6 +211,21 @@ EOF
|
||||||
|
|
||||||
apply_patch '01-no-root-login.diff'
|
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'
|
||||||
|
|
||||||
##
|
##
|
||||||
# ?????
|
# ?????
|
||||||
#
|
#
|
||||||
|
|
|
@ -14,4 +14,8 @@
|
||||||
# Increase root file system size to take all available space.
|
# Increase root file system size to take all available space.
|
||||||
resize2fs "$(findmnt / -o source -n)"
|
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
|
exit 0
|
||||||
|
|
Reference in New Issue