Skip to content

Releases: daidaiJ/2native-ssh-mcp

v1.6.0

Choose a tag to compare

@github-actions github-actions released this 07 Sep 11:31

v1.6.0: command results render as sectioned text by default

  • execute-command success results return human-readable sectioned text (real newlines); per-connection resultFormat: "json" opts into structured JSON; error paths always JSON
  • output normalization: CRLF/lone CR to LF in all output paths; result JSON no longer HTML-escaped
  • approval gate covers session open with cmdString; elicitation prompts time out after 5 min (fail-closed)
  • file-transfer download arrow fixed (remote to local)
  • docs: result rendering + agent hot-update guide across all guides (zh/en)

v1.5.0

Choose a tag to compare

@github-actions github-actions released this 05 Sep 12:18

v1.5.0: cross-session context + file-transfer result fixes

  • Command log enabled by default (20 entries/connection, .ssh-mcp-logs/,
    survives restarts); list-servers shows the last 3 commands per
    connection with relative age and failure exit codes
  • file-transfer results: elapsedS (fixes ns-in-ms field), integer
    speedBps, skippedFiles/resumedFiles in directory aggregates
  • Agent skills/guides: verified operational traps (concurrent same-batch
    calls, pgrep -f self-match, sudo without TTY, atomic overwrite of
    running binaries)

v1.4.1

Choose a tag to compare

@github-actions github-actions released this 29 Aug 11:46

i18n docs (EN/zh-CN) + MCP Registry publishing workflow

v1.4.0

Choose a tag to compare

@github-actions github-actions released this 27 Aug 14:34

feat: localPathMode — configurable local path scope for file transfers

  • New per-connection localPathMode: "cwd" (default, cwd + allowedLocalPaths),
    "list" (only allowedLocalPaths), "any" (unrestricted)
  • New CLI flag --local-path-mode for single-host mode
  • Denied-path message is now mode-agnostic; empty whitelist reports "No allowed local paths"
  • Docs synced: HUMAN_GUIDE, AGENT_GUIDE, SECURITY, SKILL, README

v1.3.0

Choose a tag to compare

@github-actions github-actions released this 26 Aug 10:52

v1.3.0: 安全加固与引用计数租约

安全加固:

  • SSH 主机密钥校验(accept-new 默认:首次连接记录 known_hosts,密钥变更拒绝连接;strict 拒绝未知主机;known_hosts 文件与 ~/.ssh 目录自动创建)
  • HTTP daemon 支持 Bearer token 鉴权,非 loopback 监听强制要求(fail closed)
  • Admin API 校验 loopback 来源与 Host 头;shutdown 端点要求 POST + JSON,防止本地网页触发关停
  • 会话/日志随机 ID 改用 crypto/rand,不可预测
  • 修复输出预算、引用计数、心跳等多处数据竞态

引用计数与租约:

  • 额外 start 的 guest 引用带 15 分钟 TTL,空闲自动回收;任何 /mcp 请求刷新全部租约;stop 优先减 guest 再减 owner

后台任务:

  • 连接断开时 close 无法确认远端作业停止的会话标记 orphaned,可重试;后台日志文件路径带一次性随机后缀

v1.2.0

Choose a tag to compare

@github-actions github-actions released this 26 Aug 01:34

Release v1.2.0:连接可靠性、后台会话保留、ANSI 剥离、配置权限检查可跳过

  • keepalive:OpenSSH 语义(任意回复即存活)、单 in-flight 发送、握手超时遵循 ConnectionTimeoutMs
  • in-flight 保护:命令执行中不 Disconnect;keepalive 失败标记 unhealthy 而非中断命令
  • 后台任务:无 PTY 独立通道启动(setsid、</dev/null、远端日志),连接闪断后仍存活,仅显式 close 才停止(TERM 后 KILL)
  • 逻辑会话断连后保留;ensureShell 自动重连并恢复 CWD
  • 结构化结果:非 0 退出码是正常结果;新增 SSH_CONNECTION_LOST(retriable=false,带部分输出)
  • SFTP 错误分类:远端父目录缺失 / 权限拒绝 / 文件缺失
  • session 工具:action=list + 各 action 参数校验
  • issue #1:后台作业结束后会话保留 60 分钟(idle generation 防竞态误杀),close 幂等,read 支持 offset=0 重读,JSON 带 logPath/exitCode
  • 输出默认剥离 ANSI 转义序列(stripAnsi: false 保留颜色/进度条)
  • 本地路径错误:穿越 vs 白名单外两种文案分开(错误码 LOCAL_PATH_NOT_ALLOWED 不变)
  • 配置:$global.allowInsecureConfigPerms 跳过启动权限检查(等价 --allow-insecure-config-perms)

v1.1.0

Choose a tag to compare

@github-actions github-actions released this 24 Aug 10:58

v1.1.0 — 安全加固、会话管理、4 工具 API

基于 SSH 的 MCP 服务器(Go),在 v1.0.0 基础上增强安全与 Agent 友好性。

工具(4 个)

  • list-servers:服务器元数据、别名、活跃会话
  • execute-command:一次性或 sessionName 有状态执行
  • session:open/read/close,支持 background 长任务
  • file-transfer:上传/下载

安全

  • SECURITY.md 威胁模型与工具注解(readOnly/destructive)
  • 输出脱敏(Bearer、PEM、password=)
  • 配置文件权限检查(Unix mode / Windows ACL)

会话与输出

  • 命名交互会话 + 后台任务(nohup + 远程日志)
  • 超时远程进程清理
  • 轻量输出压缩(≥4KB head/tail + 去重)

其他

  • 服务器 metadata/aliases、POSIX 路径、断点续传重叠校验
  • Agent Skills:2native-ssh-mcp-helper / 2native-ssh-mcp-agent

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 22 Aug 06:09

v1.0.0 — 首个正式版本

基于 SSH 的 MCP 服务器(Go 实现),参考 classfang/ssh-mcp-server 重写。

工具

  • execute-command:远程命令执行,白/黑名单、超时、输出上限、keepAlive 保活
  • file-transfer:上传/下载整合为单工具,MCP 进度通知、去重、断点续传
  • list-servers:服务器列表与系统状态

特性

  • stdio + streamable HTTP 双传输模式
  • HTTP daemon:start/stop/status/kill、引用计数、Windows 开机自启
  • 命令日志:按连接记录最近 N 条命令(不含输出),可只记成功
  • 安全:凭据支持 ${ENV_VAR} 引用,不进 MCP 配置参数
  • SFTP 并发传输、TCP keepalive、代理、Pageant/2FA、exec/shell 双模式