export interface SshResult { readonly stdout: string; readonly stderr: string; readonly code: number; } export interface SshSession { readonly exec: (command: string, onOutput?: (chunk: string) => void) => Promise; readonly dispose: () => Promise; readonly download?: (remotePath: string, localPath: string) => Promise; readonly upload?: (localPath: string, remotePath: string) => Promise; readonly forward?: (remoteHost: string, remotePort: number) => Promise<{ readonly port: number; readonly close: () => Promise; }>; } export interface SshTarget { readonly address: string; readonly user: string; readonly privateKey: string; readonly port: number; readonly via?: "direct" | "cloudflared"; } export interface SshExecutor { readonly connect: (target: SshTarget) => Promise; readonly dispose?: () => Promise; } export interface HostKeyStore { readonly get: (host: string, port: number) => Promise; readonly set: (host: string, port: number, key: string) => Promise; } export declare const inMemoryHostKeyStore: () => HostKeyStore; export declare const verifyHostKey: (store: HostKeyStore, host: string, port: number, presented: string) => Promise<"ok" | "mismatch">; export declare const connectWithRetry: (executor: SshExecutor, target: SshTarget, { timeoutMs, intervalMs, log, }?: { timeoutMs?: number; intervalMs?: number; log?: (message: string) => void; }) => Promise; export declare const createSshExecutor: (store?: HostKeyStore) => SshExecutor; export declare const sshExecutor: SshExecutor; //# sourceMappingURL=ssh.d.ts.map