huaweicloud/huaweicloud-skills/huawei-cloud-ascend-remote-connect

Claude Code and agent skill by huaweicloud/huaweicloud-skills

Trust tier 3
  • community
  • ext:[{"type":"config","description":"Configuration overrides"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Provides temporary SSH remote connection for Huawei Cloud Ascend devices with dynamic host/port/user/password input (in-memory only), covering disk management, NPU monitoring, container management, security auditing and log analysis; sensitive operations require user confirmation before execution. Use this skill to remotely connect to Ascend servers, monitor NPU health, manage disks/LVM, or troubleshoot Ascend devices. Triggers include: SSH, remote, Ascend, NPU, 远程连接, 昇腾, NPU监控

Install

npx vskill@latest install huaweicloud/huaweicloud-skills/huawei-cloud-ascend-remote-connect

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as huaweicloud/huaweicloud-skills/huawei-cloud-ascend-remote-connect.

Huawei Cloud Ascend Remote Connection

Overview

Provides temporary SSH remote connection capability for Huawei Cloud Ascend devices. Supports simultaneous connection to multiple machines. All sensitive operations (delete, modify, move, etc.) require user confirmation before execution. Passwords are only stored in memory and destroyed after session ends.

Architecture

System Architecture Diagram
┌─────────────────────────────────────────────────────────────────────┐
│ User Interaction Layer │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ Natural Language Commands / CLI Arguments │ │
│ │ (connect, execute, monitor, disconnect) │ │
│ └────────────────────────────┬────────────────────────────────┘ │
│ │ │
│ ▼ │
├────────────────────────────────┼─────────────────────────────────────┤
│ Skill Core Components │
│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │
│ │ Session Manager │←→│ Command Executor│←→│ SSH Client │ │
│ │ - Connection │ │ - NL Parsing │ │ - paramiko │ │
│ │ - Pooling │ │ - Validation │ │ - ControlMaster│ │
│ │ - Timeout Mgmt │ │ - Execution │ │ - Key/Cert Auth│ │
│ └─────────────────┘ └─────────────────┘ └────────┬────────┘ │
│ │ │ │ │
│ │ │ ▼ │
│ │ │ ┌─────────────────┐ │
│ │ │ │ Command Validator│ │
│ │ │ │ - Blocked Cmds │ │
│ │ │ │ - Confirm Req │ │
│ │ │ └─────────────────┘ │
│ │ │ │
│ ▼ ▼ │
├────────────────────────────────┼─────────────────────────────────────┤
│ Huawei Cloud Ascend Infrastructure │
│ (Remote Target Servers) │
│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │
│ │ Ascend NPU │ │ OS Services │ │ Containers │ │
│ │ - npu-smi │ │ - systemctl │ │ - docker │ │
│ │ - Driver │ │ - journalctl │ │ - k8s │ │
│ │ - FW Upgrade │ │ - Network Mgmt │ │ - Pods │ │
│ └─────────────────┘ └─────────────────┘ └─────────────────┘ │
│ │
│ Data Flow: User → Skill → SSH Tunnel → Target Server → Response │
└─────────────────────────────────────────────────────────────────────┘
Component Relationships
ComponentResponsibilityKey Features
Session ManagerManage SSH connectionsConnection pooling, timeout management, lifecycle control
Command ExecutorProcess user commandsNatural language parsing, command routing, result formatting
SSH ClientEstablish secure tunnelsparamiko integration, ControlMaster, authentication
Command ValidatorSecurity enforcementBlocked commands list, confirmation requirements
Cloud Service Integration
  • Ascend NPU Management: Direct access to npu-smi for monitoring and management
  • Huawei Cloud Infrastructure: Secure SSH access to cloud servers and containers
  • Security Compliance: Memory-only credential storage, session isolation

Prerequisites

System Requirements
  • Python 3.8+
  • paramiko >= 3.4.0
Environment Check
Prerequisite check: Python3 + paramiko required
```bash
python3 --version # Python3 >= 3.8
python3 -c "import paramiko; print('OK')" # SSH library
```
If not installed: pip3 install --user paramiko cryptography

Authentication

Security rules (must be followed):
- Prohibited from reading, echoing, or printing password values
- Prohibited from asking the user to input passwords directly in the conversation
- Only allowed to read credentials from command line arguments
- Interactive mode rejects any connection command that embeds a password in the conversation for the same reason; use --password or --key CLI arguments instead
- Connection passwords are stored in memory only and cleared when the session ends

Parameter Confirmation

Input Parameters
ParameterRequiredDescription
hostYesTarget server IP address (IPv4 only, e.g. 192.168.1.100; domain names are not supported)
portNoSSH port (default: 22)
userYesSSH username
passwordYes*SSH password (* required unless --key is provided)
keyNoSSH private key file path (alternative to password)
Parameter Validation
  • IP address format: IPv4 (e.g., 192.168.1.100)
  • Port range: 1-65535
  • Username: alphanumeric and underscore
  • Password must be a non-empty string
Confirmation Requirements

The following operations require explicit user confirmation:

  • Delete: rm, rmdir
  • Format: mkfs, fdisk -d, parted rm
  • Unmount: umount
  • Reboot: reboot, shutdown, init 6
  • Shutdown: poweroff, halt, init 0
  • User delete: userdel, groupdel
  • Permission change: chmod -R, chown -R

IAM Permission Policies

Ensure the target server has SSH service enabled and the provided credentials have appropriate permissions.

Minimum required permissions on target server:

  • SSH access (port 22 or custom)
  • Sudo privileges for system management operations

Core Workflow

Task 1: Establish SSH Connection
bash
python3 scripts/main.py --host <ascend-server-ip> --port 22 --user root --password <your-password> --command "npu-smi info"

Prefer key-based authentication (recommended):

bash
python3 scripts/main.py --host <ascend-server-ip> --port 22 --user root --key <private-key-file> --command "npu-smi info"
Note: Only IPv4 addresses are supported (e.g. 192.168.1.100). Domain names and hostnames are not supported.
Task 2: Interactive Mode
bash
python3 scripts/main.py

Usage Instructions

Connect to Ascend Server
SSH connect to 192.168.1.100 port 22 as root with password xxx
Execute Commands
NPU Monitoring
npu-smi info
Check NPU status
NPU health check
System Management
Check CPU and memory
df -h
top -bn1
Connection Management
Show current connections
Switch to 192.168.1.101
Disconnect SSH

Output Format

Standard Response Format

All command outputs follow a structured format:

┌─────────────────────────────────────────┐
│ Target: <host>:<port> │
│ Command: <executed-command> │
│ Exit Code: <0-success/non-zero-fail> │
├─────────────────────────────────────────┤
│ STDOUT: │
│ <command-output> │
├─────────────────────────────────────────┤
│ STDERR: │
│ <error-output> │
├─────────────────────────────────────────┤
│ Duration: <seconds>s │
└─────────────────────────────────────────┘
Error Response Format
[ERROR] <error-code>
Message: <error-description>
Suggestion: <troubleshooting-tip>
Success Indicators
  • Exit Code: 0
  • STDOUT: Contains expected output
  • STDERR: Empty or contains only warnings

Verification Method

Basic Verification Steps
  1. Environment Check

``bash python3 --version # Verify Python 3.8+ python3 -c "import paramiko" # Verify paramiko installed ``

  1. Connection Test

``bash python3 scripts/main.py --host <test-ip> --port 22 --user root --password <test-pwd> --command "echo test" ``

  1. NPU Monitoring Test

``bash python3 scripts/main.py --host <ascend-ip> --user root --password <pwd> --command "npu-smi info" ``

Expected Results
Test CaseExpected Output
Environment checkPython version >= 3.8, paramiko import success
Connection testExit code 0, "test" in stdout
NPU infoNPU device information displayed

See references/verification-method.md for detailed verification procedures.


Script Files

Entry File
  • main.py: Skill entry file (required)
  • Function: Provide interactive menu, unified entry point
  • Menu options:
  • Establish SSH connection
  • Execute commands
  • Disconnect
Core Scripts
  • executor.py: Command executor (main entry)
  • Function: Parse user input, dispatch commands to corresponding handlers
  • Core methods:
  • handle_command(text): Command dispatch entry
  • _connect(info): Establish SSH connection
  • _detect_disks(): Detect unmounted disks
  • _handle_auto_mount(text): Configure auto-mount on boot
  • _confirm_disk_merge(info): Disk merge confirmation
  • session_manager.py: Session manager
  • Function: Manage multiple concurrent SSH sessions
  • Core methods:
  • create_session(host, port, username, password): Create new session
  • execute_command(command): Execute command in active session
  • switch_session(host): Switch to specified host session
  • close_session(): Close current session
  • get_session_info(): Get all session information
  • ssh_client.py: SSH client
  • Function: Low-level SSH connection implementation, supports password and key authentication
  • Core methods:
  • connect(): Establish SSH connection
  • exec_command(command): Execute remote command
  • close(): Close connection
  • command_validator.py: Command validator
  • Function: Security layer, filter dangerous commands
  • Validation rules:
  • Blocklist: Direct block (e.g., fork bomb)
  • Sensitive: Require confirmation (e.g., rm -rf, reboot)
  • Allowlist: Direct execution (e.g., ls, cat, df)

Supported Features

NPU Management
  • NPU status monitoring (npu-smi)
  • NPU health check
  • NPU configuration viewing
Disk Management
  • Disk detection
  • LVM merging
  • Partition mounting
  • Auto-mount on boot
  • Disk health check
  • Free space check
System Management
  • CPU/Memory/Disk monitoring
  • System updates
  • User/permission management
  • Cron job management
Network Management
  • Port scanning
  • Firewall configuration
  • Route viewing
  • Network interface configuration
  • DNS troubleshooting
Container Management
  • Docker installation and management
  • Image management
  • Container management
  • Log viewing
  • Docker Compose operations
Security Management
  • Login auditing
  • SSH key management
  • High-risk command blocking
Log Management
  • System logs
  • Application log analysis
  • Error troubleshooting
File Operations
  • Upload/download
  • Copy/transfer
  • Change permissions
  • Create/delete

Connection Pool Management

Features
  • Connection Reuse: Reuse same connection for same target, avoid repeated handshakes
  • Auto Disconnect: Auto disconnect after 10 minutes idle (configurable)
  • Thread Safe: Support multi-thread concurrent access
  • Status Query: View connection pool status and idle time

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Extension points

  • configConfiguration overrides

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/huaweicloud/huaweicloud-skills/huawei-cloud-ascend-remote-connect/badge)](https://verified-skill.com/skills/huaweicloud/huaweicloud-skills/huawei-cloud-ascend-remote-connect)

Something wrong with this skill or its page? Tell us.