ssh_shell_close
Closes an interactive SSH shell session to release server resources and terminate remote connections.
Instructions
Cierra una sesión de shell interactiva y libera recursos
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | ID de la sesión de shell a cerrar |
Implementation Reference
- src/index.ts:723-737 (handler)The handleShellClose method implements the logic for closing an SSH shell session.
private async handleShellClose(args: any): Promise<CallToolResult> { this.requireConnection(); const sessionId = args.sessionId as string; const session = this.shellSessions.get(sessionId); if (!session) { throw new Error(`Sesión "${sessionId}" no encontrada.`); } this.destroyShellSession(sessionId, session); this.audit("ssh_shell_close", `sessionId=${sessionId}`, "ok"); return { content: [{ type: "text", text: `Sesión "${sessionId}" cerrada.` }], }; - src/tools.ts:262-273 (registration)Registration of the ssh_shell_close tool with its description and input schema.
name: "ssh_shell_close", description: "Cierra una sesión de shell interactiva y libera recursos", inputSchema: { type: "object", properties: { sessionId: { type: "string", description: "ID de la sesión de shell a cerrar", }, }, required: ["sessionId"], },