From 0c9c54f4817fd08acfef91d16a750b194479013a Mon Sep 17 00:00:00 2001 From: Disassembler Date: Fri, 22 Mar 2019 10:31:59 +0100 Subject: [PATCH] Enable SSH only if any keys exist --- _vm.sh | 5 +---- vmmgr | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/_vm.sh b/_vm.sh index e6690d8..046922a 100755 --- a/_vm.sh +++ b/_vm.sh @@ -89,14 +89,11 @@ wget https://dl.dasm.cz/_vm.tar -O - | tar xf - -C /mnt chroot /mnt apk --no-cache add bridge ca-certificates curl e2fsprogs-extra gettext iptables kbd-misc libressl lxc postfix nginx openssh-server openssh-sftp-server util-linux wireguard-virt@et wireguard-tools-wg@et acme-sh@vm vmmgr@vm chroot /mnt newaliases mkdir -p /mnt/var/log/lxc -for SERVICE in cgroups consolefont crond iptables networking nginx ntpd postfix sshd swap urandom vmmgr; do +for SERVICE in cgroups consolefont crond iptables networking nginx ntpd postfix swap urandom vmmgr; do ln -s /etc/init.d/${SERVICE} /mnt/etc/runlevels/boot done ADMINPWD=$(htpasswd -bnBC 10 "" "${ENCPWD}" | tr -d ':\n' | sed 's/$2y/$2b/') envsubst /mnt/etc/vmmgr/config.json -# Disable root login using password -sed -i 's/root::/root:!:/' /mnt/etc/shadow - # Cleanup rm -rf /mnt/root mkdir -p /mnt/root/.ssh diff --git a/vmmgr b/vmmgr index 81d9bb7..2494c55 160000 --- a/vmmgr +++ b/vmmgr @@ -1 +1 @@ -Subproject commit 81d9bb74ee63af02e20acda532f925fab2affa0d +Subproject commit 2494c55493cb0d097e0e1d8a048785c88c29ab09