aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/disk-image-builder/nested/patches/05-ssh-hostkeys
diff options
context:
space:
mode:
authorCarsten Koester <ckoester@cisco.com>2016-05-25 05:58:29 -0400
committerDave Wallace <dwallacelf@gmail.com>2016-06-02 00:18:28 +0000
commit9d378548cc86028c55baf17260d32d0055603b78 (patch)
tree1cc67da7195459abcaca5f12f0f4b74bc399b60e /resources/tools/disk-image-builder/nested/patches/05-ssh-hostkeys
parent036f36181c177e4c77f22cdbdcb87fb2f94df3bf (diff)
CSIT-111: Add Packer based framework to auto-generate disk images
Change-Id: Ia18ea34a6288aec0f12f176f4cc264d0f215d1fd Signed-off-by: Carsten Koester <ckoester@cisco.com>
Diffstat (limited to 'resources/tools/disk-image-builder/nested/patches/05-ssh-hostkeys')
-rwxr-xr-xresources/tools/disk-image-builder/nested/patches/05-ssh-hostkeys11
1 files changed, 11 insertions, 0 deletions
diff --git a/resources/tools/disk-image-builder/nested/patches/05-ssh-hostkeys b/resources/tools/disk-image-builder/nested/patches/05-ssh-hostkeys
new file mode 100755
index 0000000000..de8be15798
--- /dev/null
+++ b/resources/tools/disk-image-builder/nested/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