summaryrefslogtreecommitdiff
path: root/share/hooks/005-remove-openssh-server-host-keys.chroot
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2011-08-23 17:10:38 +0200
committerDaniel Baumann <daniel@debian.org>2011-08-23 17:10:38 +0200
commit9a59c0a2d65dde87839e9d184a9e561885b8b743 (patch)
tree6048ade60372a2cbbe4e0e18e7cbeb94f7945b87 /share/hooks/005-remove-openssh-server-host-keys.chroot
parent535e9a5d947fc62c2dfe00d4f668e9277c48c649 (diff)
downloadvyos-live-build-9a59c0a2d65dde87839e9d184a9e561885b8b743.tar.gz
vyos-live-build-9a59c0a2d65dde87839e9d184a9e561885b8b743.zip
Moving removal of openssh-server host keys from chroot_hacks to a hook, that way it can be easily skipped if desired.
Diffstat (limited to 'share/hooks/005-remove-openssh-server-host-keys.chroot')
-rwxr-xr-xshare/hooks/005-remove-openssh-server-host-keys.chroot10
1 files changed, 10 insertions, 0 deletions
diff --git a/share/hooks/005-remove-openssh-server-host-keys.chroot b/share/hooks/005-remove-openssh-server-host-keys.chroot
new file mode 100755
index 000000000..862704981
--- /dev/null
+++ b/share/hooks/005-remove-openssh-server-host-keys.chroot
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+# Remove OpenSSH Host Keys.
+#
+# This removes openssh-server host keys, they are regenerated by live-config
+# on system start.
+
+rm -f /etc/ssh/ssh_host_*_key /etc/ssh/ssh_host_*_key.pub