ssh-mcp-pro API - v1.1.2
    Preparing search index...

    Class SessionManager

    Session manager with LRU cache and TTL

    Index

    Constructors

    • Parameters

      • maxSessions: number = 20
      • defaultTtlMs: number = 900_000
      • cleanupIntervalMs: number = 10_000
      • security: {
            allowedCiphers: string[];
            allowRootLogin: boolean;
            hostKeyPolicy: HostKeyPolicy;
            knownHostsPath: string;
        } = ...
      • Optionalpolicy: Pick<PolicyEngine, "assertAllowed">

      Returns SessionManager

    Methods

    • Closes all active sessions

      Returns Promise<void>

    • Closes an SSH session

      Parameters

      • sessionId: string

      Returns Promise<boolean>

    • Destroys the session manager, cleaning up all sessions and intervals

      Returns Promise<void>

    • Gets cached OS info for a session (detects and caches if needed)

      Parameters

      • sessionId: string

      Returns Promise<OSInfo>

    • Gets session with auto-reconnect if disconnected

      Parameters

      • sessionId: string

      Returns Promise<SSHSession | undefined>

    • Checks if a session is alive by executing a simple command

      Parameters

      • sessionId: string

      Returns Promise<boolean>