360 Secure SkillHub
360 安全技能中心

Ssh Exec

该 Skill 通过 SSH 在远程 Tailscale 节点上执行单条命令并返回 stdout/stderr,无需打开交互式会话;支持自定义端口、SSH_TARGET/SSH_PORT 环境变量,以及把本地脚本通过管道交给远端 bash 执行。需要目标机 SSH 访问权限(~/.ssh 密钥或 SSH_AUTH_SOCK)和 ssh 二进制。

xejrax
xejrax
热度 93.39
最近更新 2026-05-17 11:21:14
分类:自动化依赖:代码执行应用场景:自动化脚本 / DevOps / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add ssh-exec
Metadata
name
ssh-exec
description
Run a single command on a remote Tailscale node via SSH without opening an interactive session.
metadata
{"openclaw":{"emoji":"🖥️","requires":{"bins":["ssh"]},"install":[]}}

SSH Exec Skill

Run a single command on a remote Tailscale node via SSH without opening an interactive session. Requires SSH access to the target (key in ~/.ssh/ or SSH_AUTH_SOCK) and SSH_TARGET env var (e.g., 100.107.204.64:8022).

Execute a Remote Command

Run a command on the target and return stdout/stderr:

ssh -p 8022 user@100.107.204.64 "uname -a"

Execute with Custom Port

Use the SSH_TARGET env var:

ssh -p "${SSH_PORT:-22}" "$SSH_HOST" "df -h"

Run a Script Remotely

Pipe a local script to the remote host:

ssh -p 8022 user@100.107.204.64 'bash -s' < local-script.sh