ssh_status
Check current SSH connection status including active profile, connected host, and session duration for remote server administration.
Instructions
Muestra el estado de la conexión SSH actual (perfil, host, tiempo conectado)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:184-207 (handler)Handler function for 'ssh_status' tool which retrieves and returns the current SSH connection status.
private handleStatus(): CallToolResult { if (!this.sshClient || !this.currentProfile || !this.connectedAt) { return { content: [{ type: "text", text: "No hay conexión activa." }], }; } const uptime = Math.floor((Date.now() - this.connectedAt.getTime()) / 1000); const profile = getProfile(this.currentProfile); return { content: [ { type: "text", text: [ `Perfil: ${this.currentProfile}`, `Host: ${profile.host}:${profile.port}`, `Usuario: ${profile.username}`, `Conectado hace: ${formatUptime(uptime)}`, ].join("\n"), }, ], }; } - src/tools.ts:34-41 (schema)Definition and schema for the 'ssh_status' tool.
{ name: "ssh_status", description: "Muestra el estado de la conexión SSH actual (perfil, host, tiempo conectado)", inputSchema: { type: "object", properties: {}, }, }, - src/index.ts:63-64 (registration)Registration of the 'ssh_status' tool within the main request handler switch statement.
case "ssh_status": return this.handleStatus();