/claim #7724
This PR fixes the sporadic SSH ‘Permission denied (publickey,password)’ errors that occur when Coolify sends the wrong SSH key.
SSH key file validation was inadequate: The validateSshKey method only checked if the key file existed, not whether its content matched the database. If a key was updated in the database but the file was not refreshed, stale/wrong keys would be used.
Server key change did not invalidate multiplexing: When a servers private_key_id was changed to point to a different key, the existing SSH multiplexed connection was not closed. The old connection would continue using the old (now invalid) key.
No key tracking in mux metadata: The multiplexing metadata only tracked connection age, not which SSH key was used. This made it impossible to detect when a connection should be refreshed due to key changes.
Fixes #7724
Erdogan Kervanli
@erdogan98
Zach Latta
@zachlatta