/* tslint:disable */ /* eslint-disable */ /* auto-generated by NAPI-RS */ export const enum AgentConnectionKind { Pageant = 0, Pipe = 1, Unix = 2 } function connectAgent(connection: AgentConnection, callback: ((err: Error | null, arg: Uint8Array) => any)): Promise export const enum HashAlgorithm { Sha1 = 0, Sha256 = 1, Sha512 = 2 } function parseKey(data: string, password?: string | undefined | null): SshKeyPair function isPageantRunning(): boolean /** Parse a public key from OpenSSH format string (e.g., "ssh-ed25519 AAAA... comment") */ function parsePublicKey(data: string): SshPublicKey export const OPEN_READ: number export const OPEN_WRITE: number export const OPEN_APPEND: number export const OPEN_CREATE: number export const OPEN_TRUNCATE: number export const enum SftpFileType { Directory = 0, File = 1, Symlink = 2, Other = 3 } function supportedCiphers(): Array function supportedKexAlgorithms(): Array function supportedMacs(): Array function supportedCompressionAlgorithms(): Array function supportedKeyTypes(): Array function connect(transport: SshTransport, cipherAlgos: Array | undefined | null, kexAlgos: Array | undefined | null, keyAlgos: Array | undefined | null, macAlgos: Array | undefined | null, compressionAlgos: Array | undefined | null, connectionTimeoutSeconds: number | undefined | null, keepaliveIntervalSeconds: number | undefined | null, keepaliveMax: number, serverKeyCallback: ((err: Error | null, arg: SshPublicKey) => Promise), dataCallback: ((err: Error | null, arg0: number, arg1: Uint8Array) => any), extendedDataCallback: ((err: Error | null, arg0: number, arg1: number, arg2: Uint8Array) => any), eofCallback: ((err: Error | null, arg: number) => any), closeCallback: ((err: Error | null, arg: number) => any), disconnectCallback: ((err: Error | null, arg: Error | undefined | null) => any), x11ChannelOpenCallback: ((err: Error | null, arg0: NewSshChannel, arg1: string, arg2: number) => any), tcpipChannelOpenCallback: ((err: Error | null, arg0: NewSshChannel, arg1: string, arg2: number, arg3: string, arg4: number) => any), agentChannelOpenCallback: ((err: Error | null, arg: NewSshChannel) => any), bannerCallback: ((err: Error | null, arg: string) => any)): Promise export class AgentConnection { kind: AgentConnectionKind path?: string static new(kind: AgentConnectionKind, path?: string | undefined | null): AgentConnection } export class SshAgentStream { write(data: Uint8Array): Promise close(): Promise } export class NewSshChannel { activate(): Promise activateSftp(): Promise } export class SshChannel { id(): Promise requestPty(term: string, colWidth: number, rowHeight: number, pixWidth: number, pixHeight: number): Promise requestShell(): Promise requestExec(command: string): Promise requestX11Forwarding(singleConnection: boolean, x11Protocol: string, x11Cookie: string, screen: number): Promise requestAgentForwarding(): Promise windowChange(colWidth: number, rowHeight: number, pixWidth: number, pixHeight: number): Promise data(data: Uint8Array): Promise eof(): Promise close(): Promise } export class SshPublicKey { algorithm(): string fingerprint(): string base64(): string bytes(): Uint8Array } export class SshKeyPair { publicKey(): SshPublicKey } export class SftpFileMetadata { size: string uid?: number user?: string gid?: number group?: string permissions?: number atime?: number mtime?: number type(): SftpFileType } export class SftpDirEntry { name: string type: SftpFileType metadata(): SftpFileMetadata } export class SftpFile { read(n: number): Promise writeAll(data: Uint8Array): Promise flush(): Promise shutdown(): Promise } export class SftpChannel { channelId: number readDir(path: string): Promise> stat(path: string): Promise createDir(path: string): Promise readlink(path: string): Promise rename(src: string, dst: string): Promise chmod(path: string, mode: number): Promise removeDir(path: string): Promise removeFile(path: string): Promise close(): Promise open(path: string, mode: number): Promise } export class SshTransport { static newSocket(address: string): Promise static newCommand(command: string, args: Array): Promise static newSshChannel(channel: NewSshChannel): Promise static newSocksProxy(proxyHost: string, proxyPort: number, targetHost: string, targetPort: number): Promise static newHttpProxy(proxyHost: string, proxyPort: number, targetHost: string, targetPort: number): Promise } export class KeyboardInteractiveAuthenticationPrompt { prompt: string echo: boolean } export class KeyboardInteractiveAuthenticationState { state: string partialSuccess: boolean name?: string instructions?: string remainingMethods: Array prompts(): Array | null } export class SshAuthResult { success: boolean partialSuccess: boolean remainingMethods: Array } export class SshClient { authenticateNone(username: string): Promise authenticatePassword(username: string, password: string): Promise authenticatePublickey(username: string, key: SshKeyPair, hashAlgorithm?: HashAlgorithm | undefined | null): Promise startKeyboardInteractiveAuthentication(username: string): Promise respondToKeyboardInteractiveAuthentication(responses: Array): Promise authenticateAgent(username: string, connection: AgentConnection, specificKey?: SshPublicKey | undefined | null): Promise channelOpenSession(): Promise tcpipForward(address: string, port: number): Promise cancelTcpipForward(address: string, port: number): Promise channelOpenDirectTcpip(address: string, port: number, originatorAddress: string, originatorPort: number): Promise disconnect(): Promise }