Skip to main content
Glama
d3v1an
by d3v1an

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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"),
          },
        ],
      };
    }
  • 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();

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/d3v1an/ssh-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server