/claim #7724

Proposed changes

  • Replace SSH key validation in SshMultiplexingHelper from shell ls existence-check to filesystem-backed sync validation.
  • Compare the stored key file content with the encrypted DB key for the server private key.
  • If the file is missing or out-of-sync, rewrite it via storeInFileSystem().
  • When out-of-sync content is detected, clear local mux artifacts (ssh-mux socket file + mux metadata cache) so the next command does not reuse stale connection state.

Why this helps issue #7724

The sporadic auth failures are consistent with stale per-instance key files: some app instances can keep an older key file while DB has the latest key. This change forces each command path to reconcile key file content against DB before building the SSH command.

Proof

  • Added unit regression test: tests/Unit/SshKeySyncValidationTest.php
    • starts with stale key file content
    • invokes validateSshKey
    • asserts key file is rewritten to DB value
    • asserts mux socket + mux metadata are cleared
  • Test run:
    • php artisan test --compact tests/Unit/SshKeySyncValidationTest.php tests/Unit/SshMultiplexingDisableTest.php

Checklist

  • PR created against v4.x
  • Relevant unit tests executed for this change
  • Tests added to validate fix behavior
  • Additional docs required

Claim

Total prize pool $250
Total paid $0
Status Pending
Submitted February 27, 2026
Last updated February 27, 2026

Contributors

LI

Liuyi Yu

@yuliuyi717-ux

100%

Sponsors

ZA

Zach Latta

@zachlatta

$250