Repository & SSH Tuning
Hardening Off-Site SSH with --append-only Ransomware Keys
Lock down InterServer Storage Slice authorized_keys so compromised client servers can push new backups without deleting past archives.
Zero Client Delete · Restricted Path · 2-Key Split
Defeating Root-Level Ransomware on Production VPS
If an attacker gains root on your web server and runs borg delete on your repo, an --append-only forced SSH command logs the transaction safely as reversible append segments while preserving every prior snapshot.
Where to Run Weekly Compaction Safely
Execute borgmatic prune and compact either locally on the InterServer Storage Slice over cron/systemd or from a separate hardened bastion that never shares SSH keys with production web nodes.
Measured Thresholds & Borgmatic Configuration
| SSH Key Tier | authorized_keys ForceCommand | Capabilities Granted |
|---|---|---|
| Nightly Client Key | command="borg serve --append-only --restrict-to-path /srv/borg/host1" | Create new archives only; prune/delete/compact blocked |
| Trusted Admin Key | command="borg serve --restrict-to-path /srv/borg/host1" | Runs weekly prune + compact from isolated bastion |
| SSH Hardening Flags | no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty | Blocks interactive shell & SSH tunneling if client key leaks |