From 570f9cbbe853d18ff2b22f3948889d9cd14fae47 Mon Sep 17 00:00:00 2001 From: Sean Date: Mon, 14 Nov 2022 15:07:22 -0800 Subject: [PATCH] added more logging for various key-regen actions --- pishrink.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pishrink.sh b/pishrink.sh index 583077f..f08c447 100755 --- a/pishrink.sh +++ b/pishrink.sh @@ -331,6 +331,7 @@ if [[ $prep == true ]]; then dd if=/dev/hwrng of=/dev/urandom count=1 bs=4096 status=none fi rm -f $mountdir/etc/ssh/ssh_host_*_key* + info "regenerating ssh host keys" ssh-keygen -A -f $mountdir > /dev/null fi fi @@ -341,9 +342,10 @@ if [[ $prep == true ]]; then info "WARNING: could not locate dropbearkey command, keeping old keys" else rm -f $mountdir/etc/dropbear/dropbear_*_host_key - dropbearkey -t rsa -f $mountdir/etc/dropbear/dropbear_rsa_host_key - dropbearkey -t ecdsa -f $mountdir/etc/dropbear/dropbear_ecdsa_host_key - dropbearkey -t ed25519 -f $mountdir/etc/dropbear/dropbear_ed25519_host_key + info "regenerating dropbear keys" + dropbearkey -t rsa -f $mountdir/etc/dropbear/dropbear_rsa_host_key > /dev/null + dropbearkey -t ecdsa -f $mountdir/etc/dropbear/dropbear_ecdsa_host_key > /dev/null + dropbearkey -t ed25519 -f $mountdir/etc/dropbear/dropbear_ed25519_host_key > /dev/null fi fi umount "$mountdir"