docs: README step 13 sshd reload guard + CHANGELOG Fixed — hotfix sshd-reload-inactive

This commit is contained in:
bchanot committed 2026-10-12 21:23:59 +02:00
1 parent 64f06bbbbc
commit 9d8347f58f
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -21,6 +21,7 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versioning: se
### Fixed
- `~/.gitconfig` was deployed with the literal `@USER@` / `@EMAIL@` placeholders: the installer read the identity from the repo bashrc template instead of the answers.
- An `&` in the name no longer corrupts the rendered identity on bash 5.2 and later (`patsub_replacement` turned off).
- `install.sh`: the sshd hardening step no longer aborts the install when `ssh.service` is inactive (WSL, sshd never started): `/run/sshd` is created before `sshd -t`, so a valid drop-in is no longer removed as rejected, and the reload (`try-reload-or-restart`) runs only when sshd is active.
## [1.0.0] — 2026-10-06
+1 -1
View File
@@ -75,7 +75,7 @@ What it does:
10. On Linux, installs **code-server** (VS Code in the browser) via its vendor script — skipped if already present — and enables the `code-server@<login>` systemd service (login from `id -un`: the bashrc overrides `$USER`).
11. On Linux, **offers** (`[Y/n]`, Enter = yes) to install **`ubuntu-desktop-minimal`** (GDM + GNOME Shell, ~1.5 GB): the RDP remote login below hands out a GNOME session, which a bare server install does not have. If accepted, then **offers** (`[Y/n]`) **RDP remote login** via `gnome-remote-desktop` (Wayland-native); no desktop means no RDP question. On **WSL** (`WSL_DISTRO_NAME` set or `microsoft` in `/proc/version`) both default to **no** (`[y/N]`): Windows owns the display, and the desktop drags in NetworkManager + systemd-resolved, which rewrite `/etc/resolv.conf` and break DNS for the rest of the install. With no terminal attached the default applies. The RDP setup installs the daemon + `openssl`, generates a self-signed TLS cert once, and prompts interactively for shared "gate" credentials (skipped when no terminal is attached, or already set). Disables `xrdp` if present; opens UFW port `3389` only when UFW is already active. Finally, when `lspci` sees an NVIDIA GPU, runs `ubuntu-drivers install` to put on the driver the distro recommends for the card (no version pinned; loads at the next reboot). Skipped on machines without an NVIDIA GPU.
12. On Linux, at the very end, **offers** (`[y/N]`) to install the **`cloudpex`** NAS mount helper to `/usr/local/bin` via `cloudpex/install.sh`, which prompts for the NAS host, share name, SMB user, mount point and SMB version and writes them to `/etc/cloudpex.conf` (root, `0600`; an existing config is shown and kept unless you say `n`; skipped when no terminal is attached). Nothing is mounted, no password stored, see [`cloudpex/README.md`](cloudpex/README.md).
13. On Linux, installs the **security baseline**, always, no prompt: **fail2ban** (+ `nftables`) with `etc/fail2ban/jail.d/local.conf` (sshd jail reading the journal, bans the offending IP on every port so the SSH port does not matter, 5 failures in 10 min → 1 h ban, loopback and private LAN ranges never banned); **unattended-upgrades** enabled through `etc/apt/apt.conf.d/20auto-upgrades`; and the **sshd drop-in** `etc/ssh/sshd_config.d/20-hardening.conf` (`PermitRootLogin no`, `MaxAuthTries 3`, `LoginGraceTime 20`), checked with `sshd -t` and removed again if sshd rejects it, then `reload ssh`. Authentication methods, port and user lists are left as they are.
13. On Linux, installs the **security baseline**, always, no prompt: **fail2ban** (+ `nftables`) with `etc/fail2ban/jail.d/local.conf` (sshd jail reading the journal, bans the offending IP on every port so the SSH port does not matter, 5 failures in 10 min → 1 h ban, loopback and private LAN ranges never banned); **unattended-upgrades** enabled through `etc/apt/apt.conf.d/20auto-upgrades`; and the **sshd drop-in** `etc/ssh/sshd_config.d/20-hardening.conf` (`PermitRootLogin no`, `MaxAuthTries 3`, `LoginGraceTime 20`), checked with `sshd -t` (`/run/sshd` is created first, so the check also works when sshd is not running) and removed again if sshd rejects it, then reloaded with `systemctl try-reload-or-restart ssh` when `ssh.service` is active; otherwise (WSL, sshd never started) the drop-in stays in place and applies at the next sshd start. Authentication methods, port and user lists are left as they are.
14. On Linux, at the very end, **offers** (`[y/N]`, skipped when no terminal is attached) to move **`/tmp` to disk**: Ubuntu mounts `/tmp` as a RAM-backed tmpfs capped at 50% of RAM, which agent runs fill, halving the RAM and breaking every shell with "No space left on device". Accepting masks `tmp.mount` and installs `etc/tmpfiles.d/tmp.conf` (wipe at boot, 10-day purge). Effective at the next reboot.
15. On Linux, at the very end, **offers** to keep **SSH reachable under memory pressure**: installs the `ssh.service` drop-in (`OOMScoreAdjust=-1000`, `MemoryMin=256M`) and `earlyoom` with `etc/default/earlyoom` (kills the largest process, `node`/`java` first and never `sshd`, once free RAM and swap both drop under 10%). Restarting `ssh` keeps open sessions. Note: `MemoryMin` protects the sshd daemon only; login sessions live in `user.slice`, so no setting can reserve RAM for a future shell. earlyoom acting in time is the real protection.
16. On Linux, at the very end, **offers** to set up **rootless Docker**: installs `uidmap dbus-user-session slirp4netns docker-ce-rootless-extras`, runs `dockerd-rootless-setuptool.sh install` as you (the apt package puts it in `/usr/bin`, so no `PATH` line is needed, unlike the `~/bin` install from `get.docker.com/rootless`), then `loginctl enable-linger` so the user daemon starts at boot. The tool creates `~/.config/systemd/user/docker.service` and switches the CLI to the `rootless` context; the deployed bashrc exports `DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock` whenever that socket exists, for tools that ignore contexts. The rootful daemon is disabled first (`systemctl disable --now docker.service docker.socket`, socket removed), as the docs recommend: `docker` then only talks to your user daemon. Needs `/etc/subuid` and `/etc/subgid` entries for the user (Ubuntu adds them at user creation).