<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[能不能加个 Agent Skills，让 AI 调用 XTerminal 里的 ssh 会话]]></title><description><![CDATA[<p dir="auto">希望 XTerminal 能暴露一些接口给 AI 用，复用我已经配好的 ssh 资产，而不是让 AI 直接拿密钥去连服务器。</p>
<p dir="auto">核心就几个：</p>
<p dir="auto">执行命令，返回 stdout/stderr<br />
上传下载文件<br />
获取服务器基本状态（cpu、内存、磁盘、文件列表之类）<br />
全程密钥不出 XTerminal，AI 只发指令，XTerminal 替它跑。</p>
<p dir="auto">说白了就是做个中间层，既能用 AI 又不暴露敏感信息。</p>
<p dir="auto">一个新的ssh工具 Termark 已经有这个功能了，可以参考下</p>
<p dir="auto"><img src="/assets/uploads/files/1780024885803-d3740e38-d484-4abe-8e82-461a2a7c9d02-image-resized.png" alt="d3740e38-d484-4abe-8e82-461a2a7c9d02-image.png" class=" img-fluid img-markdown" /></p>
<pre><code>---
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 &lt;keyword&gt; --json
termark exec &lt;asset-id&gt; -- &lt;command&gt;
termark upload &lt;asset-id&gt; &lt;local-path&gt; &lt;remote-path&gt;
termark download &lt;asset-id&gt; &lt;remote-path&gt; &lt;local-path&gt;
</code></pre>
<h2>File Transfer</h2>
<pre><code class="language-bash">termark upload &lt;asset-id&gt; ./dist /tmp/dist
termark upload &lt;asset-id&gt; ./app.tar.gz /tmp/release.tar.gz
termark download &lt;asset-id&gt; /var/log/nginx ./logs/nginx
termark download &lt;asset-id&gt; /tmp/app.tar.gz ./latest.tar.gz
</code></pre>
<h2>Rules</h2>
<ul>
<li>Do not ask the user for SSH passwords, private keys, or passphrases. Termark holds those credentials and connects via saved configurations.</li>
<li><code>termark exec</code> takes an asset id, opens a temporary SSH connection, runs the command, and closes the connection.</li>
<li><code>termark upload</code> takes an asset id, a local file or folder path, and a remote destination path.</li>
<li><code>termark download</code> takes an asset id, a remote file or folder path, and a local destination path.</li>
<li>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.</li>
<li>Long-running tasks should use tmux/nohup/systemd on the remote host.</li>
</ul>
<pre><code></code></pre>
]]></description><link>http://host.terminal.icu/topic/2924/能不能加个-agent-skills-让-ai-调用-xterminal-里的-ssh-会话</link><generator>RSS for Node</generator><lastBuildDate>Mon, 22 Jun 2026 00:03:30 GMT</lastBuildDate><atom:link href="http://host.terminal.icu/topic/2924.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 29 May 2026 03:25:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 能不能加个 Agent Skills，让 AI 调用 XTerminal 里的 ssh 会话 on Sun, 21 Jun 2026 18:08:15 GMT]]></title><description><![CDATA[<p dir="auto">这块后面会补。</p>
]]></description><link>http://host.terminal.icu/post/8662</link><guid isPermaLink="true">http://host.terminal.icu/post/8662</guid><dc:creator><![CDATA[稳弟]]></dc:creator><pubDate>Sun, 21 Jun 2026 18:08:15 GMT</pubDate></item></channel></rss>