16 Commits
Author SHA1 Message Date
edemilovandClaude Opus 5.5 7f06fc0442 docs: add /sshlinux and /sshwin aliases, note curl -L for the old /ssh redirect
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-04 00:53:50 +03:00
edemilovandClaude Sonnet 5 4aed1e447c docs: note edemilov.com short aliases for sshinstall scripts
Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-28 22:16:27 +03:00
edemilovandClaude Sonnet 5 84929af184 fix(sshinstall.sh): support non-systemd init (SysVinit, e.g. MX Linux)
The service step called `systemctl enable --now`, which aborts under
`set -e` when systemd is not PID 1. On MX Linux (SysVinit) this meant sshd
was never started and the firewall and admin-key steps were never reached.

Detect systemd via /run/systemd/system; otherwise fall back to
`update-rc.d`/`chkconfig` + `service <name> start`, failing with a clear
message if the service cannot be started.

Found on the first real-machine run (ThinkCentre M71e, MX Linux 25.2).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-19 18:45:20 +03:00
edemilovandClaude Sonnet 5 0480c7aed5 Merge sshinstall: add cross-platform SSH bootstrap scripts
Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-17 15:30:44 +03:00
edemilovandClaude Sonnet 5 337a209713 fix: final review fixes for sshinstall (elevation guard, Win8 drop, authorized_keys newline, style)
Final whole-branch review pass before merge:

1. sshinstall.ps1: #Requires -RunAsAdministrator doesn't enforce under
   `irm ... | iex` (piping into Invoke-Expression). Add an explicit
   WindowsPrincipal/IsInRole elevation check before anything else runs,
   so a non-elevated run fails fast instead of silently falling through
   Get-WindowsCapability's -ErrorAction SilentlyContinue into the
   unsupported-OS branch.

2. sshinstall.ps1: drop the Windows 8 portable Win32-OpenSSH fallback —
   it depends on Expand-Archive (PS 5.0+) and implicit TLS 1.2, neither
   present on stock Windows 8's PS 3.0/4.0, so the one path that existed
   for Windows 8 was guaranteed to fail on Windows 8. Replaced with a
   clear unsupported-OS failure. Windows support is now 10 (1809+)/11
   only; README table updated to match.

3. sshinstall.sh: guarantee a trailing newline before appending the
   admin key to authorized_keys, so a pre-existing file without one
   doesn't get its last line glued to the new key (which also defeats
   the grep -qF idempotency check on every future run). Added the
   equivalent guard to sshinstall.ps1's Add-Content path too — its
   WriteLine only guarantees a trailing newline after what it writes,
   not before, so a hand-edited or externally-written
   administrators_authorized_keys has the same exposure.

4. sshinstall.sh: pacman -Sy -> -S (drop the partial-upgrade footgun,
   matches apps.sh's install-vs-explicit-update convention); chown -R
   now sets both user and group explicitly (matches apps.sh/
   netdrivelink.sh convention).

5. sshinstall.ps1: rename the firewall rule this script creates to
   OpenSSH-Server-In-TCP-sshinstall — the previous name collided with
   the exact rule name Microsoft's own Add-WindowsCapability OpenSSH
   install uses, so a disabled Microsoft-created rule of that name
   would cause New-NetFirewallRule to throw under
   $ErrorActionPreference = "Stop" and kill the script before the key
   was deployed.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-17 15:27:30 +03:00
edemilovandClaude Sonnet 5 93d9ead905 Correct spec after final review: drop unworkable Windows 8 fallback, fix stale branch/key-destination wording
Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-17 15:24:34 +03:00
edemilov c4efd37831 docs: add sshinstall.sh/.ps1 usage 2026-09-17 15:17:14 +03:00
edemilovandClaude Haiku 4.5 def3d57799 fix: sshinstall.ps1 ACL idempotency + SID hardening + Move-Item safety
- Fix ACL idempotency: check if ACLs already locked down before running
  icacls; use Write-Skip if no broader groups present, else re-lock
- Harden SID check: explicit SecurityIdentifier construction vs string coercion
- Add explicit New-Item for Move-Item destination in Win8 fallback

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
2026-09-17 15:14:28 +03:00
edemilovandClaude Haiku 4.5 902e95a79d Add sshinstall.ps1 — Windows SSH bootstrap + admin key deploy
Co-Authored-By: Claude Haiku 4.5 <[email protected]>
2026-09-17 15:07:40 +03:00
edemilov 088d692954 Add sshinstall.sh — Linux SSH bootstrap + admin key deploy 2026-09-17 15:04:10 +03:00
edemilovandClaude Sonnet 5 25800331fe Add implementation plan for sshinstall bootstrap scripts
Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-17 14:58:04 +03:00
edemilovandClaude Sonnet 5 2a2ed5711b Fill in admin public key in sshinstall design spec
Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-17 14:55:16 +03:00
edemilovandClaude Sonnet 5 9a68a19dea Add design spec for cross-platform sshinstall bootstrap script
Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-17 14:51:41 +03:00
edemilov d6018b13f0 update: add all apps + zsh default 2026-04-19 02:01:26 +03:00
edemilov d46650b30e docs: session reminder context 2026-04-18 02:45:03 +03:00
edemilov dbb97e9493 initial: homelab scripts 2026-04-17 23:29:35 +03:00