Waiting for SSH before continuing server setup
Recovering the read after an actual sshd source penalty in 5 attempts without weakening server policy. Wrong key, trust and console failures stop; writers are never retried.
After SSH setup, the administrator exists, the key and sudo have been verified, and root SSH is disabled. A subsequent connection can still be refused: negative authentication probes can accumulate a temporary source-address penalty. We add a separate readiness wait before continuing installation.
Why only the read may repeat
The system OpenSSH client and approved known_hosts stay in use. The command checks current boot identity against independent console evidence, the selected administrator key and a harmless password-sudo read. It neither installs packages nor connects through root.
deploy-cli host setup administrator-ready \
--root-env-file "$ORIGINAL_ROOT_ENV" \
--administrator-env-file "$ADMIN_ENV" \
--request-file "$ORIGINAL_REQUEST" \
--current-request-file "$CURRENT_REQUEST"
The original root profile is needed only to compare original and current authority locally. Every actual readiness SSH connection uses the administrator. After success, the package coordinator still verifies history and its approved plan; connection readiness does not replace installation approval.
A refusal may contain data before SSH identification
On a fresh isolated Debian VM, the server sent a 26-byte plaintext notice and closed the connection before SSH identification. A zero-byte-only retry rule therefore did not cover this actual behavior.
The observer checks protocol state: the server closed before an SSH identification line appeared. Only an empty stream or complete printable pre-identification lines qualify, bounded to 4096 bytes total and 255 bytes per line. Binary data, partial lines, overflow or an SSH- prefix disable retries. Neither particular refusal wording nor client stderr is matched.
RFC 4253 describes identification exchange before key exchange. This bounded pre-authentication observation does not itself prove a working channel. Success still requires the actual guarded OpenSSH read.
RFC 4253, §4.2 · OpenSSH: PerSourcePenalties
Automatic recovery without weakening sshd
After controlled failed logins, readiness succeeded on the fifth attempt. The server closed four connections before identification; the fifth performed the required read. The following fields are selected from the actual JSON response, omitting the nested transport observation.
{
"status": "passed",
"attempts": 5,
"pre_authentication_closes": 4,
"temporary_scopes": 5,
"temporary_scopes_cleaned": 5,
"guarded_administrator_ready": true,
"root_ssh_dispatched": false,
"host_write_performed": false,
"local_state_write_performed": false,
"whole_host_ready": false
}
The CLI waits 2 seconds, then 4, then 8 between reads, allowing at most eight attempts. Cancellation interrupts the wait. Temporary local sockets and helpers are cleaned separately from persistent state. Both sshd configuration and effective policy remained identical before and after the run.
Waiting does not repair invalid access
An incorrect key and incorrect known_hosts each failed after one attempt without retry. Old console evidence stopped before SSH. These fields come from the incorrect-known_hosts response:
{
"status": "failed",
"attempts": 1,
"pre_authentication_closes": 0,
"guarded_administrator_ready": false
}
After connection recovery, the ordinary coordinator installed 19 new archives and completed utility verification. Its writers received no retries. Runtime-service and complete-wizard adoption remain the next step.
The frame below is a genuine terminal displaying a saved-results summary, not raw command output. Capture repeated no installation or reboot.

