fix: robust SSH auth + always pull latest kiosk-setup from Gitea on boot

Replace sed-based PermitRootLogin fix with explicit appends to guarantee
root SSH with password works for debugging. .bash_profile now pulls the
latest install-kiosk.sh from Gitea before running so fixes take effect
without rebuilding the ISO or recreating the VM.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-26 00:50:00 +00:00
parent 86f6334737
commit 0dcfe060e5
+8 -5
View File
@@ -22,14 +22,17 @@ EOF
echo "==> SeniorNet: configuring setup to run on first login..." echo "==> SeniorNet: configuring setup to run on first login..."
cat >> /root/.bash_profile << 'EOF' cat >> /root/.bash_profile << 'EOF'
# SeniorNet first-boot setup — runs once then removes itself # SeniorNet first-boot setup — always pulls latest from Gitea, runs once
if [ -x /usr/local/bin/kiosk-setup ]; then if [ -f /usr/local/bin/kiosk-setup ]; then
/usr/local/bin/kiosk-setup curl -fsSL https://gitea.jgitta.com/jgitta/senior-kiosk/raw/branch/master/install-kiosk.sh \
-o /usr/local/bin/kiosk-setup 2>/dev/null || true
bash /usr/local/bin/kiosk-setup
fi fi
EOF EOF
# Allow root SSH login for debugging during setup # Allow root SSH login with password for debugging during setup
sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config
# Boot to text mode for the setup wizard # Boot to text mode for the setup wizard
systemctl set-default multi-user.target systemctl set-default multi-user.target