Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

Ssh Remote Control

v1.0.10

SSH远程控制电脑 - 让AI Agent通过SSH连接和操作远程Mac/Linux电脑,无需在被控电脑上安装任何agent工具。一个服务器上的AI,触手伸向多台远程设备。

2· 219·1 current·1 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for lixiang92229/ssh-remote-control.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Ssh Remote Control" (lixiang92229/ssh-remote-control) from ClawHub.
Skill page: https://clawhub.ai/lixiang92229/ssh-remote-control
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install ssh-remote-control

ClawHub CLI

Package manager switcher

npx clawhub@latest install ssh-remote-control
Security Scan
VirusTotalVirusTotal
Suspicious
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
Name and description claim SSH-based remote control and the SKILL.md describes exactly that (ssh/scp examples, macOS/Linux commands, tunnel guidance). That capability legitimately requires host/port/user/key. However, registry metadata presented earlier lists 'Required env vars: none' while the SKILL.md and _meta.json declare required env vars (SSH_TARGET_HOST, SSH_TARGET_PORT, SSH_TARGET_USER, SSH_KEY_PATH). This metadata mismatch is an incoherence (likely a packaging/metadata error) and should be resolved before trusting the skill.
!
Instruction Scope
The runtime instructions explicitly require the agent to run SSH and SCP commands and access a local private key path (SSH_KEY_PATH). That is consistent with the stated purpose but is high-impact: any agent with access to the private key can log into all systems that accept it. The SKILL.md also instructs the user to set up tunnel tools (ngrok/frp) which is expected but increases exposure surface. The instructions do not include enforcement mechanisms (no code that would limit or sandbox commands) — they rely on the operator to restrict keys/accounts on the remote hosts.
Install Mechanism
This is an instruction-only skill (no install spec, no code files to run). That minimizes install-time risk because nothing is downloaded or executed automatically by installation. Risk shifts to runtime: the agent executing SSH commands on behalf of the user.
Credentials
Requested environment variables (host, port, user, path to private key) are appropriate and proportionate for an SSH remote-control skill. However, the skill requires access to a sensitive secret (the SSH private key file). The metadata inconsistency (registry listing none vs _meta.json/README declaring requiredEnvVars) is concerning — it may lead to unexpected exposure if platform-level protections assume none are required. The SKILL.md recommends using a dedicated, limited-permission key which is the correct mitigation.
Persistence & Privilege
The skill does not request persistent/always-on inclusion (always:false) and does not declare actions that modify other skills or system-wide agent settings. Autonomous invocation is allowed by default but not itself a flag here; combine that with the sensitive key-access requirement when deciding whether to allow autonomous execution.
What to consider before installing
This skill does what it says — it teaches the agent to SSH into remote machines and run commands — but that requires giving the agent access to a private SSH key (SSH_KEY_PATH). Before installing or enabling: 1) Verify the skill source/repository and maintainers (the registry lists an unknown source). 2) Do NOT reuse an existing key: create a dedicated SSH key pair for this skill and grant the remote account minimal permissions (non-admin user, limited sudo if any). 3) Restrict the key in authorized_keys (command=, no-pty, from=) and consider a passphrase + ssh-agent or an SSH certificate with short lifetime. 4) Keep the private key file permission-restricted (600) and ensure the platform will not leak it in logs or to other skills. 5) Resolve the metadata mismatch (the registry claims no required env vars but the skill expects several) — ask the publisher to correct packaging. 6) If you plan to allow autonomous agent actions, limit scope (dedicated account, strict remote-side command restrictions) because the agent can execute arbitrary commands once it has key access. If you cannot enforce these mitigations or verify the publisher, treat the skill as high-risk and do not provide access to sensitive keys or privileged accounts.

Like a lobster shell, security has layers — review code before you run it.

latestvk9700cg624cp9zfts7ms5mkjv583z5d4
219downloads
2stars
11versions
Updated 3w ago
v1.0.10
MIT-0

SSH Remote Control - 远程控制技能

技能简介

让 AI Agent 从服务器通过 SSH 远程连接和控制 Mac/Linux 电脑,无需在被控电脑上安装任何 agent 工具。

核心原理:

  • AI Agent 部署在服务器
  • 通过 SSH 密钥认证连接远程设备
  • 用 CLI 命令操作远程电脑(文件、软件、系统等)

对比传统方案:

方案Agent位置被控电脑需要安装架构
传统方案本地电脑需要本地控制本地
本技能服务器不需要远程控制远程

工作原理

架构图

┌─────────────┐     SSH      ┌─────────────────┐
│   AI Agent │ ──────────> │  Remote Computer  │
│  (服务器)   │   加密隧道   │  (Mac/Linux)      │
│             │ <──────────  │                   │
│  执行命令    │   返回结果   │  无需安装agent   │
└─────────────┘             └─────────────────┘

连接流程

  1. 远程电脑配置 SSH + 内网穿透
  2. AI 服务器生成 SSH 密钥对
  3. 公钥添加到远程电脑
  4. AI 通过 SSH 命令控制远程电脑

环境变量

变量名必填说明
SSH_TARGET_HOST远程电脑的公网地址或域名
SSH_TARGET_PORTSSH 端口(默认22)
SSH_TARGET_USER远程电脑用户名
SSH_KEY_PATH本地私钥路径
DEFAULT_SHELL远程电脑默认shell(默认/bin/zsh)

使用示例

基础连接测试

ssh -i $SSH_KEY_PATH -p $SSH_TARGET_PORT $SSH_TARGET_USER@$SSH_TARGET_HOST 'echo "SSH OK"'

文件操作

# 查看目录
ssh -i $SSH_KEY_PATH -p $SSH_TARGET_PORT $SSH_TARGET_USER@$SSH_TARGET_HOST 'ls -la ~/Desktop/'

# 查看文件内容
ssh -i $SSH_KEY_PATH -p $SSH_TARGET_PORT $SSH_TARGET_USER@$SSH_TARGET_HOST 'cat ~/Desktop/test.txt'

# 创建文件
ssh -i $SSH_KEY_PATH -p $SSH_TARGET_PORT $SSH_TARGET_USER@$SSH_TARGET_HOST 'cat > ~/Desktop/ai_created.txt << '"'"'EOF'"'"'
这是AI创建的文件
EOF'

# 上传文件到远程电脑
scp -i $SSH_KEY_PATH -P $SSH_TARGET_PORT localfile $SSH_TARGET_USER@$SSH_TARGET_HOST:/path/to/remote/

# 从远程电脑下载文件
scp -i $SSH_KEY_PATH -P $SSH_TARGET_PORT $SSH_TARGET_USER@$SSH_TARGET_HOST:/path/to/remote/file localpath/

软件控制(macOS)

# 打开应用
ssh -i $SSH_KEY_PATH -p $SSH_TARGET_PORT $SSH_TARGET_USER@$SSH_TARGET_HOST 'open -a "Safari"'

# 关闭应用
ssh -i $SSH_KEY_PATH -p $SSH_TARGET_PORT $SSH_TARGET_USER@$SSH_TARGET_HOST 'osascript -e '"'"'quit application "Safari"'"'"''

# 查看运行中的程序
ssh -i $SSH_KEY_PATH -p $SSH_TARGET_PORT $SSH_TARGET_USER@$SSH_TARGET_HOST 'osascript -e '"'"'tell application "System Events" to get name of every process'"'"''

AppleScript 交互(macOS)

# 获取应用名称
ssh -i $SSH_KEY_PATH -p $SSH_TARGET_PORT $SSH_TARGET_USER@$SSH_TARGET_HOST 'osascript -e '"'"'tell application "NetEase Cloud Music" to name'"'"''

# 获取Chrome当前标签
ssh -i $SSH_KEY_PATH -p $SSH_TARGET_PORT $SSH_TARGET_USER@$SSH_TARGET_HOST 'osascript -e '"'"'tell application "Google Chrome" to get URL of every tab of every window'"'"''

# 截屏
ssh -i $SSH_KEY_PATH -p $SSH_TARGET_PORT $SSH_TARGET_USER@$SSH_TARGET_HOST 'screencapture ~/Desktop/screenshot.png'

系统监控

# 查看系统版本
ssh -i $SSH_KEY_PATH -p $SSH_TARGET_PORT $SSH_TARGET_USER@$SSH_TARGET_HOST 'sw_vers'

# 查看资源使用
ssh -i $SSH_KEY_PATH -p $SSH_TARGET_PORT $SSH_TARGET_USER@$SSH_TARGET_HOST 'top -l 1 | head -10'

# 查看磁盘空间
ssh -i $SSH_KEY_PATH -p $SSH_TARGET_PORT $SSH_TARGET_USER@$SSH_TARGET_HOST 'df -h'

# 查看运行进程
ssh -i $SSH_KEY_PATH -p $SSH_TARGET_PORT $SSH_TARGET_USER@$SSH_TARGET_HOST 'ps aux | head -20'

开发环境操作

# 查看Node.js版本
ssh -i $SSH_KEY_PATH -p $SSH_TARGET_PORT $SSH_TARGET_USER@$SSH_TARGET_HOST 'node --version'

# 查看Git状态
ssh -i $SSH_KEY_PATH -p $SSH_TARGET_PORT $SSH_TARGET_USER@$SSH_TARGET_HOST 'cd ~/project && git status'

# Docker操作
ssh -i $SSH_KEY_PATH -p $SSH_TARGET_PORT $SSH_TARGET_USER@$SSH_TARGET_HOST 'docker ps'

远程电脑配置要求

macOS 配置步骤

  1. 开启远程登录

    • 系统偏好设置 → 共享 → 勾选"远程登录"
    • 设置允许访问的用户
  2. 生成SSH密钥对

    ssh-keygen -t ed25519 -C "ai@server"
    
  3. 添加公钥到远程电脑

    echo "公钥内容" >> ~/.ssh/authorized_keys
    chmod 700 ~/.ssh
    chmod 600 ~/.ssh/authorized_keys
    
  4. 配置内网穿透(如果电脑在内网)

    为什么需要内网穿透? 大多数家庭/办公网络的电脑没有公网IP,无法直接从外网访问。内网穿透工具可以将内网端口映射到公网,让外部设备能够连接进来。

    常用内网穿透工具:

    工具特点官网
    花生壳国内老牌,稳定,支持SSHoray.com
    ngrok国际流行,配置简单ngrok.com
    frp开源免费,可自建服务器github.com/fatedier/frp
    NATAPP国内服务,免费额度natapp.cn

    安全优势——本地完全控制:

    与其他远程控制方案不同,本技能的安全性完全由你掌控:

    • 本地启动/停止:穿透工具在你本地电脑运行,你可以随时关闭它
    • 按需连接:需要时启动SSH穿透,不需要时关闭
    • 无需云端中转:SSH加密隧道直连,数据不经过第三方服务器
    • 密钥认证:即使穿透端口暴露,没有正确密钥也无法登录
    • 关闭即安全:关闭穿透工具后,任何外部设备都无法访问你的电脑

    💡 为什么"关闭穿透"是真正的安全?

    服务器的安全靠"规则"——端口持续开放,靠防火墙规则防护。 个人电脑 + 穿透工具的安全靠"开关"——穿透工具不运行,外部根本找不到你。 这不是"防护",这是物理隔离。关闭穿透 = 攻击面归零。

    使用建议:

    • 仅在需要AI远程控制时才开启穿透
    • 使用完毕立即关闭穿透工具
    • 建议配合SSH密钥认证使用,禁用密码登录
    • 定期更换SSH密钥

Linux 配置步骤

  1. 安装openssh-server

    sudo apt install openssh-server
    
  2. 配置SSH

    sudo nano /etc/ssh/sshd_config
    # 确保有:
    PasswordAuthentication no
    PubkeyAuthentication yes
    

    ⚠️ 安全建议:禁用密码认证,只允许密钥认证

  3. 重启SSH服务

    sudo systemctl restart sshd
    
  4. 配置内网穿透(同上)

安全建议

1. 密钥安全

  • 私钥文件权限必须是600
  • 不要将私钥分享给他人
  • 定期更换密钥
  • ⚠️ 重要:SSH私钥路径被AI获取后,AI理论上可访问任何使用该密钥的服务器。务必使用专用密钥对,不要使用日常登录密钥。

2. 防火墙

  • SSH端口不要暴露给0.0.0.0
  • 使用VPN或内网穿透
  • 定期查看登录日志

3. 命令限制

  • 可以在远程电脑的~/.ssh/authorized_keys中限制可执行的命令
  • 示例:
    command="/usr/local/bin/limited.sh",no-pty,permitopen="*",ssh-ed25519 AAAA...
    

4. 最小权限原则

使用专用受限账户(而非 root/管理员):

  • 在远程电脑上创建专用账户,如 aiagent
  • 只授权必要的操作权限
  • 避免 AI 使用管理员权限

密钥权限限制

  • 使用 from= 限制连接来源 IP
  • 使用 command= 限制可执行命令
  • 使用 no-pty 禁止分配伪终端
  • 使用 permitopen= 限制端口转发

示例(~/.ssh/authorized_keys):

from="你的服务器IP",no-pty,command="/bin/false",ssh-ed25519 AAAA...

5. 密钥保护建议

  • passphrase 保护:为私钥设置密码,防止密钥泄露被直接使用
  • 专用密钥:为本技能创建单独的 SSH 密钥对,可随时 revocation
  • 定期轮换:定期更换 SSH 密钥对

6. 监控与审计

  • 定期查看 SSH 登录日志
  • 监控异常的登录时间和来源
  • 记录 AI 执行的关键命令(本地日志)

故障排除

连接被拒绝

  1. 确认远程电脑SSH服务正在运行
  2. 确认防火墙允许SSH端口
  3. 确认花生壳等穿透服务正常运行

公钥认证失败

  1. 确认公钥已添加到~/.ssh/authorized_keys
  2. 确认文件权限正确:
    chmod 700 ~/.ssh
    chmod 600 ~/.ssh/authorized_keys
    

超时或断开

  1. 使用ServerAliveInterval保持连接
  2. 检查网络稳定性
  3. 确认内网穿透服务未过期

应用场景

  1. 远程办公: 在手机上通过AI操作办公室电脑
  2. 智能家居: 连接智能设备执行自动化任务
  3. 跨设备协作: 一个AI agent管理多台设备
  4. 物联网控制: 通过SSH控制树莓派等设备
  5. 远程服务器管理: 无需本地安装任何工具

技术优势

  • 无需在被控电脑安装任何软件: 只要有SSH即可
  • 跨平台: 支持macOS、Linux、Windows (WSL)
  • 云端部署: Agent在服务器,触手伸向各地
  • 安全: SSH加密隧道,无需暴露桌面
  • 高效: CLI对AI友好,Token消耗低

项目地址 | Project Links

版本历史 | Changelog

  • 1.0.9 (2026-03-31): 修复 homepage URL 与 GitHub 一致,强化私钥安全警告
  • 1.0.6 (2026-03-31): 修复 Metadata 不匹配,修复 PasswordAuthentication yes 问题,强化安全建议
  • 1.0.5 (2026-03-31): 重写 README 为整段中英双语格式
  • 1.0.4 (2026-03-31): README 格式修正
  • 1.0.3 (2026-03-31): 修复 GitHub 链接
  • 1.0.2 (2026-03-31): 添加项目链接
  • 1.0.1 (2026-03-31): 强调安全性,通用内网穿透工具,本地完全可控
  • 1.0.0 (2026-03-30): 初始版本,支持macOS/Linux远程控制

Comments

Loading comments...