/**
 * Minimal SSH/scp helpers for driving a freshly-provisioned box from a deploy
 * script, plus wait loops for the boot milestones every provider shares
 * (sshd accepting connections, cloud-init finished).
 *
 * Uses the system `ssh`/`scp` binaries via Bun.spawn — no keys or agents are
 * managed here; pass `identityFile` or rely on the ambient SSH config.
 */
export interface RemoteExecOptions {
    /** SSH user. @default 'root' */
    user?: string;
    /** Private key passed as `ssh -i`. Omit to use the ambient SSH config/agent. */
    identityFile?: string;
    /** SSH `ConnectTimeout` in seconds. @default 10 */
    connectTimeoutSec?: number;
}
export interface RemoteExecResult {
    code: number;
    stdout: string;
    stderr: string;
}
/**
 * The ssh/scp CLI arguments implied by {@link RemoteExecOptions}. Host key
 * checking is disabled because these helpers target freshly-created servers
 * whose host keys cannot be known in advance.
 */
export declare function buildSshArgs(options?: RemoteExecOptions): string[];
/** Run a command on the host over SSH, capturing exit code and output. */
export declare function sshExec(host: string, command: string, options?: RemoteExecOptions): Promise<RemoteExecResult>;
/** Like {@link sshExec}, but throws on non-zero exit and returns stdout. */
export declare function sshExecOrThrow(host: string, command: string, options?: RemoteExecOptions): Promise<string>;
/** Copy local files into a directory on the host via scp. */
export declare function scpUpload(host: string, localPaths: string[], remoteDir: string, options?: RemoteExecOptions): Promise<void>;
export interface WaitOptions extends RemoteExecOptions {
    /** Give up after this long. */
    timeoutMs?: number;
    /** Delay between attempts. @default 5000 */
    pollIntervalMs?: number;
}
/** Poll until sshd accepts the connection (box booted + key authorized). */
export declare function waitForSsh(host: string, options?: WaitOptions): Promise<void>;
/**
 * Poll `cloud-init status` until it reports done. Throws when cloud-init
 * reports an error so a broken first boot fails the deploy instead of
 * surfacing later as missing packages.
 */
export declare function waitForCloudInit(host: string, options?: WaitOptions): Promise<void>;
