跳转至内容
  • 最近帖子
  • 0 未读帖子 0
  • 板块分类
  • 服务状态
  • 跳转官网
  • 帮助文档
皮肤
  • 浅色
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • 深色
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(不使用皮肤)
  • 不使用皮肤
折叠

XTerminal 反馈社区

稳弟稳
稳弟
  1. 首页
  2. 版块
  3. xterminal 专区
  4. 能不能加个 Agent Skills,让 AI 调用 XTerminal 里的 ssh 会话

能不能加个 Agent Skills,让 AI 调用 XTerminal 里的 ssh 会话

已定时 已固定 已锁定 已移动 xterminal 专区
2 帖子 2 发布者 0 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • Y 离线
    Y 离线
    yangheng
    开坛元老
    编写于 最后由 编辑
    #1

    希望 XTerminal 能暴露一些接口给 AI 用,复用我已经配好的 ssh 资产,而不是让 AI 直接拿密钥去连服务器。

    核心就几个:

    执行命令,返回 stdout/stderr
    上传下载文件
    获取服务器基本状态(cpu、内存、磁盘、文件列表之类)
    全程密钥不出 XTerminal,AI 只发指令,XTerminal 替它跑。

    说白了就是做个中间层,既能用 AI 又不暴露敏感信息。

    一个新的ssh工具 Termark 已经有这个功能了,可以参考下

    d3740e38-d484-4abe-8e82-461a2a7c9d02-image.png

    ---
    name: termark
    description: This skill should be used when the user asks to "connect to a server", "SSH into a machine", "run a command on a remote host", "list SSH assets", "upload/download files to a server", or mentions the `termark` CLI. Use `termark` instead of running `ssh`, `scp`, or `sftp` directly.
    ---
    
    # Termark CLI
    
    Use the `termark` CLI to manage SSH assets, run one-off commands, and transfer files through the user's running Termark desktop app.
    
    Prefer `termark` over running `ssh`, `scp`, or `sftp` directly.
    Run `termark --help` to discover commands. The CLI outputs JSON when piped.
    
    ## Common Workflow
    
    ```bash
    termark assets list -q <keyword> --json
    termark exec <asset-id> -- <command>
    termark upload <asset-id> <local-path> <remote-path>
    termark download <asset-id> <remote-path> <local-path>
    

    File Transfer

    termark upload <asset-id> ./dist /tmp/dist
    termark upload <asset-id> ./app.tar.gz /tmp/release.tar.gz
    termark download <asset-id> /var/log/nginx ./logs/nginx
    termark download <asset-id> /tmp/app.tar.gz ./latest.tar.gz
    

    Rules

    • Do not ask the user for SSH passwords, private keys, or passphrases. Termark holds those credentials and connects via saved configurations.
    • termark exec takes an asset id, opens a temporary SSH connection, runs the command, and closes the connection.
    • termark upload takes an asset id, a local file or folder path, and a remote destination path.
    • termark download takes an asset id, a remote file or folder path, and a local destination path.
    • Destination paths follow scp-style behavior: if the destination exists and is a directory, the source keeps its name inside that directory; otherwise the destination path is used as the final file or folder path.
    • Long-running tasks should use tmux/nohup/systemd on the remote host.
    1 条回复 最后回复
    0
    • 稳弟稳 在线
      稳弟稳 在线
      稳弟
      xterminal
      编写于 最后由 编辑
      #2

      这块后面会补。

      1 条回复 最后回复
      0

      你好!看起来您对这段对话很感兴趣,但您还没有一个账号。

      厌倦了每次访问都刷到同样的帖子?您注册账号后,您每次返回时都能精准定位到您上次浏览的位置,并可选择接收新回复通知(通过邮件或推送通知)。您还能收藏书签、为帖子顶,向社区成员表达您的欣赏。

      有了你的建议,这篇帖子会更精彩哦 💗

      注册 登录
      回复
      • 在新帖中回复
      登录后回复
      • 从旧到新
      • 从新到旧
      • 最多赞同


      • 登录

      • 没有帐号? 注册

      • 登录或注册以进行搜索。

      1

      在线

      6.3k

      用户

      3.0k

      主题

      8.8k

      帖子
      雨云500M带宽服务器推荐🔥
      • 第一个帖子
        最后一个帖子
      0
      • 最近帖子
      • 未读帖子 0
      • 板块分类
      • 服务状态
      • 跳转官网
      • 帮助文档