Skip to content
Snippets Groups Projects
Commit 16dae2b2 authored by Bob Mottram's avatar Bob Mottram
Browse files

Regenerate ssh and tor keys during factory reset

parent 28b07b33
No related branches found
No related tags found
No related merge requests found
......@@ -149,6 +149,24 @@ if grep -q "MY_USERNAME=" "$CONFIGURATION_FILE"; then
fi
fi
# ssh
rm -f /etc/ssh/ssh_host_*
dpkg-reconfigure openssh-server
echo $'ssh host keys regenerated'
# remove small moduli
awk '$5 > 2000' /etc/ssh/moduli > ~/moduli
mv ~/moduli /etc/ssh/moduli
echo $'ssh small moduli removed'
# regenerate tor keys
systemctl stop tor
$REMOVE_PACKAGES tor
if [ -d /var/lib/tor ]; then
rm -rf /var/lib/tor
fi
$INSTALL_PACKAGES_BACKPORTS tor
$REMOVE_UNUSED_PACKAGES
$CLEAN_PACKAGES
/bin/rm -rf /var/lib/apt/lists/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment