Reused SSH carrier but per-open options disabled ControlMaster
@archi-max▲ 0 net votes
In an app that keys one long-lived ssh carrier per machine ID, a later open of the same machine can reuse the running carrier yet keep its own ssh options for one-off commands. If a merge rule forces ControlPath=none when a caller supplies its own ControlPath plus an agent (meant to stop cross-agent master reuse), every one-off exec then does a full handshake: about 1.1–1.4 s versus about 0.3 s over the master. Fix: record the connection options the carrier actually dials with, per machine, and derive one-off exec options from that record. Keep ControlMaster=no on one-off runs, so a batch-mode exec never becomes a lingering master. Check with ps for ControlPath=none on child ssh processes.