X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Ftools%2Fdisk-image-builder%2Fnested%2Fimage-patches%2F05-ssh-hostkeys;fp=resources%2Ftools%2Fdisk-image-builder%2Fnested%2Fimage-patches%2F05-ssh-hostkeys;h=de8be1579855b8b1bc6be4f56aa54fe53fc31cb0;hb=bb847371cf77f1fac6579d0444d6168b5b43c2a0;hp=0000000000000000000000000000000000000000;hpb=ec3512ff7f1405f2e7bc74bbfadf5691afc352c4;p=csit.git diff --git a/resources/tools/disk-image-builder/nested/image-patches/05-ssh-hostkeys b/resources/tools/disk-image-builder/nested/image-patches/05-ssh-hostkeys new file mode 100755 index 0000000000..de8be15798 --- /dev/null +++ b/resources/tools/disk-image-builder/nested/image-patches/05-ssh-hostkeys @@ -0,0 +1,11 @@ +#!/bin/sh + +# Generate host keys here. This will speed up first boot time ever so slightly. +# It does however mean that keys are not unique across installations -- which +# shouldn't be an issue for our use case though. + +sudo mkdir -m 0775 -p etc/ssh +for a in rsa ecdsa ed25519 dsa +do + sudo ssh-keygen -f etc/ssh/ssh_host_${a}_key -N "" -t ${a} +done