Skip to content

Instantly share code, notes, and snippets.

View bertdida's full-sized avatar
🙌

Herbert Verdida bertdida

🙌
View GitHub Profile
@bertdida
bertdida / homeserver-recover.sh
Last active August 10, 2026 06:01
Homeserver bring-back-online: fix sshd + install boot/shutdown pushn notifier
#!/bin/bash
# Homeserver bring-back-online installer.
# Run once at the physical console (monitor+keyboard) after login as `herbert`:
# curl -fsSL http://localhost:3000 >/dev/null # sanity — should return HTML
# sudo bash ~/homeserver-recover.sh
#
# What this script does:
# 1. Fixes SSH hang (UseDNS no) so remote SSH auth returns in <1s.
# 2. Installs pushn-notify.sh + boot/shutdown systemd units.
# 3. Enables the units and confirms with a test push.