ssh ssh-session-mcp
v2.8.0
Commands命令

One page for MCP tool names, CLI commands, and the normal command flow.把 MCP 工具名、CLI 命令和正常工作流放到一个页面里。

If you remember a command name but not what it does, this page is the fastest way back to the full picture. It keeps the common MCP tools and operator commands together in one place.如果你记得一个命令名,却忘了它是做什么的、应该什么时候用,这个页面会是最快的回到上下文的地方。

Agent FlowAgent 流程
ssh-device-list -> ssh-quick-connect -> ssh-run -> ssh-command-statusssh-device-list -> ssh-quick-connect -> ssh-run -> ssh-command-status
Operator CLI操作者 CLI
ssh-session-mcp-ctl status / devices / launch / logs / cleanupssh-session-mcp-ctl status / devices / launch / logs / cleanup
Best For适合
Remembering a tool name but not the exact workflow around it.记得工具名,但忘了它在整条流程里该怎么用。
ssh-run ssh-quick-connect ssh-status ssh-command-status ssh-session-mcp-ctl ssh-device-list
Recommended Flow推荐流程

The shortest normal loop for most agent work.适合大多数 Agent 工作的最短正常路径。

This is the normal path repeated across the docs and everyday usage.这是文档和日常使用里最常出现的一条正常路径。

Agent-First PathAgent 首选路径

List devices, connect once, run, inspect, poll if async, then run again.先列设备、连一次、执行、检查,必要时轮询异步,再继续执行。

ssh-device-list
ssh-quick-connect
ssh-run
ssh-status
ssh-command-status
ssh-run
When The Shell Gets Weird当 shell 进入异常状态

Drop to diagnostics, history, and control tools instead of blindly sending another command.不要盲目再发一条命令,而是切到诊断、历史和控制工具。

ssh-session-diagnostics
ssh-session-history
ssh-session-control
ssh-status
MCP ToolsMCP 工具

Tools the MCP client actually calls.MCP client 真正会调用的工具。

If a tool name looks familiar but you cannot remember why, start here.如果某个工具名看着眼熟,但一时想不起来它是干什么的,就从这里开始。

Tool工具

ssh-device-list

List configured devices and defaults.列出已配置设备和默认项。

Tool工具

ssh-quick-connect

Connect or reuse the default target and optionally open the viewer.连接或复用默认目标,并可选打开 viewer。

Tool工具

ssh-run

Main command execution path with completion detection and exit-code capture.主命令执行路径,带完成判定和退出码捕获。

Tool工具

ssh-status

Inspect sessions, viewer state, and operation mode.查看 session、viewer 状态和运行模式。

Tool工具

ssh-command-status

Poll async command progress.查询异步命令进度。

Tool工具

ssh-retry

Retry flaky commands with backoff.对易失败命令做自动重试。

Tool工具

ssh-session-history

Read mixed terminal history.查看混合终端历史。

Tool工具

ssh-session-control

Send control keys such as ctrl_c, arrows, or tab.发送 ctrl_c、方向键、tab 等控制输入。

Tool工具

ssh-session-diagnostics

Inspect lock state, warnings, running command state, and viewer health.查看锁状态、警告、运行中命令和 viewer 健康度。

Operator CLI操作者 CLI

`ssh-session-mcp-ctl` commands for local operators and debugging.面向本地操作者和调试的 `ssh-session-mcp-ctl` 命令。

These are the local operator commands people reach for most often.这些是本地操作者最常会用到的几个命令。

Status状态
ssh-session-mcp-ctl status
Devices设备
ssh-session-mcp-ctl devices
Launch启动
ssh-session-mcp-ctl launch --viewerPort=auto
Local demo本地演示
ssh-session-mcp-ctl launch --local --viewerPort=auto
Logs日志
ssh-session-mcp-ctl logs --tail=60
Cleanup清理
ssh-session-mcp-ctl cleanup
Command Questions命令问题

Short answers for the command names people forget.把大家最容易忘的命令名快速解释清楚。

These are useful when you saw a tool once in a log, prompt, or example and want a fast reminder.如果你是在日志、提示词或示例里见过一次命令名,现在想快速回忆它是做什么的,这一组最合适。

What does `ssh-quick-connect` do?`ssh-quick-connect` 是干什么的?

It opens or reuses the common SSH session and can also launch the viewer, so it is the recommended first step before `ssh-run`.它会打开或复用常用 SSH 会话,还可以顺手拉起 viewer,所以它是 `ssh-run` 之前推荐的第一步。

When should I use `ssh-command-status`?什么时候该用 `ssh-command-status`?

Use it when `ssh-run` returns an async command ID or when long-running remote work should be polled explicitly instead of guessed.当 `ssh-run` 返回异步命令 ID,或者远程长任务应该被显式轮询而不是靠猜时,就该用它。

What is `ssh-session-diagnostics` for?`ssh-session-diagnostics` 是做什么的?

It inspects lock state, warnings, running command state, and viewer health when the terminal is blocked, odd, or clearly stateful.当终端被阻塞、状态异常、或明显进入强状态依赖时,它用来检查锁状态、警告、运行中命令和 viewer 健康度。

When do I use `ssh-session-mcp-ctl` instead of MCP tools?什么时候该用 `ssh-session-mcp-ctl`,而不是 MCP 工具?

Use the CLI when you are acting as the local operator and need process status, device listing, launch, logs, or cleanup outside the MCP tool loop.当你是本地操作者,需要看进程状态、列设备、启动、看日志或清理,而不是走 MCP 工具回路时,就用这个 CLI。

Next下一步

If the command is clear, these pages cover the rest.如果命令已经看明白了,剩下的问题在这些页面里。

From here, the next step is usually setup, answers, or the bigger picture.从这里继续,下一步通常就是去看安装、答案,或者更完整的背景。