Skip to main content
Glama

ssh_close_all_sessions

Terminate all active SSH sessions managed by the SSH MCP Server to reset connections, ensure system security, or clear stale sessions.

Instructions

모든 SSH 세션 종료

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:307-314 (handler)
    MCP tool handler: decorated with @mcp.tool(), calls ssh_manager.close_all_sessions() and formats the response.
    @mcp.tool() async def ssh_close_all_sessions() -> str: """모든 SSH 세션 종료""" try: closed_count = await ssh_manager.close_all_sessions() return f"Closed {closed_count} SSH sessions" except Exception as e: return f"Failed to close sessions: {str(e)}"
  • Core implementation in SSHSessionManager: closes all sessions by iterating and calling close_session on each, returns count of closed sessions.
    async def close_all_sessions(self) -> int: """모든 세션 종료""" session_ids = list(self.connections.keys()) closed_count = 0 for session_id in session_ids: if await self.close_session(session_id): closed_count += 1 return closed_count

Other Tools

Related Tools

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/balloonf/ssh_mcp'

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