返回顶部
C

Connect_to_another_openclaw远程连接管理

Connect to and manage another OpenClaw server remotely. Check status, sync skills, restart gateway, and monitor channels.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
86
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

Connect_to_another_openclaw

技能名称: Connecttoanother_openclaw
详细描述:

连接到另一个 OpenClaw

此技能的功能

提供一个统一接口,通过 SSH 连接到远程 OpenClaw 服务器,执行健康检查、管理技能,并排查端口冲突等常见问题。

前提条件

  1. 1. SSH 访问远程机器:
- SSH 私钥文件(推荐)或密码访问 - 远程用户必须具有 sudo/root 权限 - 远程机器必须已安装 OpenClaw
  1. 2. 本地和远程均需安装 SkillHub(用于技能同步)
  2. 网络连接(端口 22 SSH)

主要工作流程

1. 连接并检查状态

bash connect-openclaw --host --action status

重要:将 替换为实际的远程服务器 IP 或域名(例如 192.168.1.100 或 myserver.com)。这是一个必需的占位符。

此命令将:

  • - 测试 SSH 连接
  • 检查 OpenClaw 网关状态
  • 列出活动通道(QQBot 等)
  • 显示最近的会话

2. 修复常见问题

bash connect-openclaw --host --action fix-port

自动执行:

  • - 检测网关端口(默认 18790)上的端口冲突
  • 终止冲突进程(SSH 隧道、测试服务)
  • 重启 OpenClaw 网关
  • 验证恢复情况

3. 同步技能

bash

查看差异

connect-openclaw --host --action diff

将远程缺失的技能安装到本地

connect-openclaw --host --action sync-to-local

将本地缺失的技能安装到远程(如果远程有 SkillHub)

connect-openclaw --host --action sync-to-remote

4. 通过远程 QQBot 发送消息

bash connect-openclaw --host --action send-qqbot \ --session agent:main:qqbot:direct:... \ --message 来自本地 OpenClaw 的问候

命令参考

命令描述
status远程 OpenClaw 的全面健康检查
fix-port
自动修复端口 18790 冲突 | | diff | 比较本地与远程技能 | | sync-to-local | 将远程独有的技能安装到本地 | | sync-to-remote | 将本地独有的技能推送到远程 | | list-skills | 列出远程所有技能 | | list-channels | 列出已配置的通道 | | list-sessions | 显示活动会话 | | tail-logs | 按通道筛选跟踪 OpenClaw 日志 | | test-connection | 简单的 SSH 测试 |

配置

此技能使用以下环境变量(可选):

变量用途默认值
CONNECTOPENCLAWSSHKEYSSH 私钥路径~/.ssh/idrsa
CONNECTOPENCLAWUSER
远程用户名 | root |
| CONNECTOPENCLAWPORT | SSH 端口 | 22 |
| CONNECTOPENCLAWGATEWAY_PORT | 远程 OpenClaw 端口 | 18790 |

您也可以将这些作为 CLI 标志传递:
bash
connect-openclaw --host example.com --user admin --key ~/.ssh/mykey.pem --action status

示例

快速诊断

bash connect-openclaw --host --action status

修复端口冲突并重启

bash connect-openclaw --host --action fix-port

同步前比较技能

bash connect-openclaw --host --action diff

单向同步(远程 → 本地)

bash connect-openclaw --host --action sync-to-local

安装

如果尚未安装,请运行:
bash
skillhub install Connecttoanother_openclaw

或者将此仓库克隆到 ~/.openclaw/workspace/skills/Connecttoanother_openclaw/。

要求

  • - Python 3.9+(如果用 JS 实现则为 Node.js 版本)
  • paramiko(Python SSH 库)或原生 ssh 命令
  • 远程 shell 访问权限

故障排除

问题解决方案
SSH 连接失败检查密钥权限(chmod 600)、网络和 authorized_keys
远程未找到 SkillHub
先在远程安装 SkillHub | | 权限被拒绝 | 确保远程用户具有 sudo/root 权限和正确的密钥 | | 修复后端口仍被占用 | 使用 lsof -i :18790 手动检查并终止进程 |

注意事项

  • - 始终先使用 --action test-connection 进行测试
  • fix-port 会终止匹配 ssh -N.*18790 和 voice-bridge-light 的进程
  • 技能同步使用 SkillHub CLI;确保两端均已安装
  • 为安全起见,sync-to-remote 在每次安装前会提示(使用 --yes 自动确认)

版本:1.0.0 作者:小李(基于 2026-03-28 实践经验) 许可证:MIT

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 connect-to-another-openclaw-1775963342 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 connect-to-another-openclaw-1775963342 技能

通过命令行安装

skillhub install connect-to-another-openclaw-1775963342

下载

⬇ 下载 Connect_to_another_openclaw v1.0.0(免费)

文件大小: 9.12 KB | 发布时间: 2026-4-13 09:51

v1.0.0 最新 2026-4-13 09:51
Initial release: Connect and manage remote OpenClaw servers via SSH.

- Provides remote status checks, troubleshooting (such as auto-fixing gateway port conflicts), and OpenClaw health monitoring.
- Enables comparing and syncing skills between local and remote servers using SkillHub.
- Supports sending messages via remote QQBot channels.
- Offers detailed CLI and environment variable configuration options.
- Includes troubleshooting guidance and example commands for common tasks.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部