鱼皮AI导航
鱼皮AI导航
  • 主页
  • 社区
  • AI工具
  • AI知识库
  • AI提示词
  • MCP
  • Skills
  • AI学习资源
  • AI资讯
  • GitHub开源
登录/注册

dsh-ssh-logs

从白名单 SSH 服务器和日志根目录读取或搜索有界日志内容,不开放任意远程命令。

远程移动端
访问 GitHub
文档README

dsh-ssh-logs

English | 简体中文

A read-only SSH log tool for DeepSeek Harness. It uses the built-in @deepseek-ai/dsh-mcp-client bridge to expose three MCP tools to the model:

  • mcp__ssh_logs__list_log_servers
  • mcp__ssh_logs__read_log
  • mcp__ssh_logs__search_log

Servers are configured under fixed aliases. The model cannot select arbitrary hosts, execute arbitrary commands, or modify remote files. Every requested file must remain under an allowlisted log root.

Installation

▼
bash
复制代码
git clone https://github.com/452926826/dsh-ssh-logs.git cd dsh-ssh-logs npm install dsh plugin --profile web add "$PWD"

It can also be installed directly from GitHub:

▼
bash
复制代码
dsh plugin --profile web add github:452926826/dsh-ssh-logs

Create ~/.dsh/ssh-logs.yml using config.example.yml as a reference. Use a dedicated read-only account on each server and authenticate with an SSH key or ssh-agent. Do not store passwords or private key contents in the YAML file.

Restart dsh web and refresh the page after configuring the plugin. The Bundle registers an MCP client so agent presets can discover the log tools.

Conversation examples

▼
text
复制代码
Read the last 300 lines of service/api.log from the app log root on production. Search logs/backend.log under staging/app for request-id=abc123 and include 3 lines of context.

If a request names a physical directory instead of a root alias, the model should call list_log_servers first, map the directory to a configured root, and then call the read or search tool.

Configuration

▼
yaml
复制代码
defaults: maxBytes: 131072 connectTimeoutSeconds: 10 commandTimeoutMs: 120000 servers: production: description: Production application server host: prod-app.example.com user: log-reader port: 22 identityFile: ~/.ssh/prod_log_reader knownHostsFile: ~/.ssh/known_hosts proxyJump: bastion.example.com roots: app: /srv/myapp/logs nginx: /var/log/nginx

Each server supports description, host, user, port, identityFile, knownHostsFile, proxyJump, roots, maxBytes, connectTimeoutSeconds, and commandTimeoutMs.

Security boundaries

  • SSH always uses BatchMode=yes, StrictHostKeyChecking=yes, and an explicit known_hosts path.
  • Servers and log roots must be configured in advance. Absolute paths, backslashes, and .. traversal are rejected.
  • The plugin only generates fixed head, tail, sed, and grep -F commands. Dynamic values are shell-quoted.
  • A request can read at most 5,000 lines or return 1,000 search matches. Output defaults to 128 KiB and has a hard 4 MiB limit.
  • Password prompts, sudo, arbitrary commands, SFTP writes, deletion, and file modification are not supported.

Enforce least privilege on the server as well: use a dedicated log-reader account, read-only ACLs, restricted source IPs, and authorized_keys restrictions when appropriate.

远程移动端

快捷安装

复制到终端去安装插件

dshplugin--profilewebaddgithub:452926826/dsh-ssh-logs

温馨提示

装插件等于在本机跑第三方代码,权限与你相同,能读文件、用凭据、访问网络,工具审批管不到。请只装可信来源,并尽量锁定 commit。

站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
🔥热门工具
朱雀AI检测朱雀AI检测
朱雀AI检测助手朱雀AI检测助手
LovartLovart
老鱼简历老鱼简历
WritePass官网WritePass官网
面多多面多多
CursorCursor
星月写作星月写作
零感AI零感AI
墨得问题墨得问题
dsh 插件推荐
dsh-web#packages/dsh-ssh
SSH 远程运维面板:Web 终端、SFTP 传输、本地端口转发与一条命令并发集群执行,Agent 与面板共用同一份主机配置。
dsh-tether
用 Android/iOS 手机远程使用电脑上的 dsh 完整网页界面,经 iroh 跨网点对点直连,中间不经过任何服务器。
dsh-im-gateway
DeepSeek Harness 聚合 IM 网关:通过微信、飞书、Telegram、Discord、QQ、WhatsApp 等 20+ 聊天平台驱动 agent,支持统一会话、远程审批和交互提问。默认放行所有能给机器人发消息的人,需要限制请配置 allowedUserIds。
dsh-android
在对话里直接操作 Android 设备——模拟器或 USB 手机,完全通过 adb 驱动:20 个 Agent 工具用于流式投屏、Gradle 构建运行、UI 树或 OCR 交互、logcat、进程与内存检查,并附带三键导航面板。
dsh-remote-ssh
类 VSCode Remote-SSH 的 DSH 插件:SSH 连接超算/服务器,内置文件页签直读远程文件、终端页签自动 SSH,远程工作区配单往返合并读与结果缓存,含 12 个会话感知的 remote_ssh_* 模型工具。