UNPKG

pure-js-sftp

Version:

A pure JavaScript SFTP client with revolutionary RSA-SHA2 compatibility fixes. Zero native dependencies, built on ssh2-streams with 100% SSH key support.

37 lines 995 B
import { EventEmitter } from 'events'; export interface SSH2StreamsConfig { host: string; port?: number; username: string; privateKey?: Buffer | string; password?: string; passphrase?: string; algorithms?: { kex?: string[]; cipher?: string[]; hmac?: string[]; compress?: string[]; }; } export interface SFTPChannel extends EventEmitter { write(data: Buffer): void; end(): void; } export declare class SSH2StreamsTransport extends EventEmitter { private socket; private ssh; private config; private connected; private authenticated; private sftpChannel; private pendingChannels; constructor(config: SSH2StreamsConfig); private setupEventHandlers; private startAuthentication; private createChannelWrapper; connect(): Promise<void>; openSFTP(): Promise<SFTPChannel>; disconnect(): void; isConnected(): boolean; } //# sourceMappingURL=ssh2-streams-transport.d.ts.map