mcp-ssh-tool
Version:
Model Context Protocol (MCP) SSH client server for remote automation
22 lines (21 loc) • 891 B
TypeScript
import { ExecResult } from './types.js';
/**
* Executes a command on the remote system
*/
export declare function execCommand(sessionId: string, command: string, cwd?: string, env?: Record<string, string>): Promise<ExecResult>;
/**
* Executes a command with sudo privileges
*/
export declare function execSudo(sessionId: string, command: string, password?: string, cwd?: string): Promise<ExecResult>;
/**
* Checks if a command exists on the remote system
*/
export declare function commandExists(sessionId: string, command: string): Promise<boolean>;
/**
* Gets the available shell on the remote system
*/
export declare function getAvailableShell(sessionId: string): Promise<string>;
/**
* Executes a command with proper shell detection
*/
export declare function execWithShell(sessionId: string, command: string, cwd?: string, env?: Record<string, string>): Promise<ExecResult>;