UNPKG

n8n-nodes-customssh

Version:

n8n community node for advanced SSH connections with configurable ciphers and network device support

32 lines (31 loc) 1.23 kB
import { CipherAlgorithm } from 'ssh2'; import { SshConnectionOptions } from '../interfaces/ConnectionOptions'; import { SshExecutionResult } from '../interfaces/SshTypes'; /** * Service for executing SSH commands */ export declare class SshCommandExecutor { /** * Execute a single SSH command on a remote device */ static executeSshCommand(host: string, port: number, username: string, password: string, command: string, ciphers: CipherAlgorithm[], options: SshConnectionOptions): Promise<SshExecutionResult>; /** * Execute multiple commands on a remote device */ static executeMultipleSshCommands(host: string, port: number, username: string, password: string, commands: Array<{ command: string; waitTime: number; }>, ciphers: CipherAlgorithm[], options: SshConnectionOptions): Promise<SshExecutionResult>; /** * Connect and execute a single command */ private static connectAndExecuteCommand; /** * Connect and execute multiple commands - improved version */ private static connectAndExecuteMultipleCommands; /** * Handle privilege escalation with enable command */ private static handlePrivilegeEscalation; }