xiaoyaner0201

Windows Remote

運維安全v1.0.0
作者:xiaoyaner0201更新於 2026-05-17windows-remote@clawhub_xiaoyaner0201/windows-remote
伺服器運維故障排查

據 AlphaMoat 統計,截至 2026-09,Windows Remote 累計下載 3,946 次、獲 0 個星標,在全部 5,078 個 AI 技能中排名第 2,617 位,在「運維安全」分類(264 個)中排名第 155 位。

累計安裝
123
累計下載
3946
星標
-
全站排名
#2,617
全站前 52% · 「運維安全」前 59%
平台累計安裝累計下載星標評論
ClawHub ↗1233501--
SkillHub ↗1233946-—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

主文要求配置主機、使用者名稱和可選 SSH 埠或金鑰,並提供 PowerShell、服務管理和檔案傳輸示例。此類操作具有較強許可權,且文件提到預設 SSH/SCP 選項會關閉嚴格主機金鑰檢查;只應管理自己有權訪問的主機,使用受限帳戶和專用金鑰,並逐項確認命令、檔案路徑和主機身份。

資料釋出於 2026-10-29

可以用來做什麼

  • 檢查遠端 Windows 主機的連線或 GPU 狀態
  • 規劃透過 SSH 執行 PowerShell 命令
  • 審查指令碼上傳和結果下載路徑

什麼時候用

  • 使用者明確授權管理目標 Windows 主機,並確認 SSH 主機金鑰、帳戶許可權和命令影響時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

只規劃一條遠端狀態檢查命令,不建立 SSH 連線或執行操作。
執行遠端指令碼前列出需要確認的主機指紋、命令和檔案傳輸路徑。

月度資料趨勢

累計下載3946
2231315240732026-03 · 累計下載 23582026-05 · 累計下載 31262026-07 · 累計下載 34872026-08 · 累計下載 36182026-09 · 累計下載 394626-0326-09
星標-
0112026-03 · 星標 -2026-05 · 星標 -2026-07 · 星標 -2026-08 · 星標 -2026-09 · 星標 -26-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-093946—-
2026-083618+3.8%-
2026-073487—-
2026-053126—-
2026-032358—-

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

3.7 KB · ClawHub v1.0.0
---
name: windows-remote
description: Control remote Windows machines via SSH. Use when executing commands on Windows, checking GPU status (nvidia-smi), running scripts, or managing remote Windows systems. Triggers on "run on Windows", "execute on remote", "check GPU", "nvidia-smi", "远程执行", "Windows 命令".
metadata:
  {
    "openclaw":
      {
        "emoji": "🖥️",
        "requires": {
          "bins": ["ssh"],
展開全部(共 163 行)
          "env": ["WINDOWS_SSH_HOST", "WINDOWS_SSH_USER"]
        },
        "env": {
          "WINDOWS_SSH_HOST": {
            "description": "Remote Windows IP or hostname",
            "required": true,
            "example": "192.168.1.100"
          },
          "WINDOWS_SSH_PORT": {
            "description": "SSH port (default: 22)",
            "required": false,
            "default": "22",
            "example": "23217"
          },
          "WINDOWS_SSH_USER": {
            "description": "SSH username",
            "required": true,
            "example": "Administrator"
          },
          "WINDOWS_SSH_KEY": {
            "description": "Path to SSH private key (default: ~/.ssh/id_ed25519)",
            "required": false,
            "default": "~/.ssh/id_ed25519"
          },
          "WINDOWS_SSH_TIMEOUT": {
            "description": "Connection timeout in seconds",
            "required": false,
            "default": "10"
          }
        }
      }
  }
---

# Windows Remote Control

Execute commands on remote Windows machines via SSH.

## Configuration

Set environment variables in `~/.openclaw/openclaw.json` under `skills.windows-remote.env`:

```json
{
  "skills": {
    "windows-remote": {
      "env": {
        "WINDOWS_SSH_HOST": "192.168.1.100",
        "WINDOWS_SSH_PORT": "22",
        "WINDOWS_SSH_USER": "Administrator"
      }
    }
  }
}
```

Or export directly:
```bash
export WINDOWS_SSH_HOST="192.168.1.100"
export WINDOWS_SSH_PORT="22"
export WINDOWS_SSH_USER="Administrator"
```

## Quick Commands

### Check Connection
```bash
scripts/win-exec.sh "echo connected"
```

### GPU Status
```bash
scripts/win-exec.sh "nvidia-smi"
```

### Run PowerShell
```bash
scripts/win-exec.sh "powershell -Command 'Get-Process | Select-Object -First 10'"
```

### Execute Script
```bash
scripts/win-exec.sh "python C:\\path\\to\\script.py"
```

## Script Reference

### win-exec.sh
Execute a single command on the remote Windows machine.

```bash
scripts/win-exec.sh "<command>"
```

### win-gpu.sh
Quick GPU status check (nvidia-smi wrapper).

```bash
scripts/win-gpu.sh
scripts/win-gpu.sh --query  # Compact output
```

### win-upload.sh
Upload files to the remote machine via SCP.

```bash
scripts/win-upload.sh <local-file> <remote-path>
```

### win-download.sh
Download files from the remote machine.

```bash
scripts/win-download.sh <remote-path> <local-file>
```

## Common Tasks

### Check if Ollama is Running
```bash
scripts/win-exec.sh "tasklist | findstr ollama"
```

### Start a Service
```bash
scripts/win-exec.sh "net start <service-name>"
```

### Run Python with GPU
```bash
scripts/win-exec.sh "python -c \"import torch; print(torch.cuda.is_available())\""
```

### Check Disk Space
```bash
scripts/win-exec.sh "wmic logicaldisk get size,freespace,caption"
```

## Troubleshooting

| Issue | Solution |
|-------|----------|
| Connection refused | Check SSH service: `Get-Service sshd` |
| Permission denied | Verify SSH key in `~/.ssh/authorized_keys` or `administrators_authorized_keys` |
| Timeout | Check firewall rules, verify IP/port |
| Command not found | Use full path or check PATH on Windows |

## Security Notes

- Use SSH keys instead of passwords
- Keep private keys secure (chmod 600)
- Consider using Tailscale for cross-network access

「運維安全」分類下的熱門技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。