From c0bc6003808091b0f380d78a00a426640251a852 Mon Sep 17 00:00:00 2001 From: sualko Date: Wed, 4 Mar 2020 09:34:28 +0100 Subject: [PATCH] remove ssh host keys and enable regeneration fix #100 --- docs/image-setup.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/image-setup.sh b/docs/image-setup.sh index 31f33b0..e2a19c4 100755 --- a/docs/image-setup.sh +++ b/docs/image-setup.sh @@ -174,6 +174,9 @@ ssh "chromium-browser --version | cut -d ' ' -f 1-2" > temp VERSION_CHROMIUM="$(cat temp)" rm temp +working "Removing SSH host keys & enable regeneration" +ssh "sudo rm -f -v /etc/ssh/ssh_host_*_key* && sudo systemctl enable regenerate_ssh_host_keys" + working "Removing temporary SSH pubkey, disabling SSH & shutting down" ssh "(echo > .ssh/authorized_keys) && sudo systemctl disable ssh && sudo shutdown -h now"