
huawei-cloud-ascend-remote-connect
Provides temporary SSH remote connection for Huawei Cloud Ascend devices with dynamic host/port/user/password input (in-memory only), disk management, NPU monitoring, container management, security auditing and log analysis; sensitive operations require user confirmation before execution Use this skillthis skill to remotely connect to Ascend servers, monitor NPU health, manage disks/LVM, or troubleshoot Ascend devices. Triggerer words: SSH, remote, Ascend, NPU, 远程连接, 昇腾, NPU监控
- Installs
- 321
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/huaweicloud/huaweicloud-skills --skill huawei-cloud-ascend-remote-connect- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads huawei-cloud-ascend-remote-connect automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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
| Component | Responsibility | Key Features |
|---|---|---|
| Session Manager | Manage SSH connections | Connection pooling, timeout management, lifecycle control |
| Command Executor | Process user commands | Natural language parsing, command routing, result formatting |
| SSH Client | Establish secure tunnels | paramiko integration, ControlMaster, authentication |
| Command Validator | Security enforcement | Blocked 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
python3 --version # Python3 >= 3.8 python3 -c "import paramiko; print('OK')" # SSH libraryIf 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
Parameter Confirmation
Input Parameters
| Parameter | Required | Description |
|---|---|---|
| host | Yes | Target server IP address |
| port | No | SSH port (default: 22) |
| user | Yes | SSH username |
| password | Yes | SSH password |
Parameter Validation
- IP address format: IPv4 (e.g., 192.168.1.100)
- Port range: 1-65535
- Username: alphanumeric and underscore
- Password: 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
python3 scripts/main.py --host <ascend-server-ip> --port 22 --user root --password <your-password> --command "npu-smi info"
Task 2: Interactive Mode
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
-
Environment Check
python3 --version # Verify Python 3.8+ python3 -c "import paramiko" # Verify paramiko installed -
Connection Test
python3 scripts/main.py --host <test-ip> --port 22 --user root --password <test-pwd> --command "echo test" -
NPU Monitoring Test
python3 scripts/main.py --host <ascend-ip> --user root --password <pwd> --command "npu-smi info"
Expected Results
| Test Case | Expected Output |
|---|---|
| Environment check | Python version >= 3.8, paramiko import success |
| Connection test | Exit code 0, "test" in stdout |
| NPU info | NPU 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 sessionexecute_command(command): Execute command in active sessionswitch_session(host): Switch to specified host sessionclose_session(): Close current sessionget_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 connectionexec_command(command): Execute remote commandclose(): 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
Protection Mechanisms
- Max Connections Limit: Default 50, supports multi-target machines
- Request Rate Limiting: Default max 200 concurrent requests
- Connection Timeout: Default 10 seconds
- Execute Timeout: Default 60 seconds
- Health Check: Check connection status every 30 seconds, auto disconnect bad connections
# Using connection pool
from ssh_client import get_pool
pool = get_pool()
result = pool.execute(conn_info, 'ls -la')
# View pool status (includes statistics)
status = pool.get_pool_status()
# {
# 'connections': [...],
# 'total_connections': 2,
# 'max_connections': 10,
# 'max_concurrent_requests': 5,
# 'statistics': {'total_requests': 100, 'failed_requests': 2, ...}
# }
# Configure protection parameters
pool.configure(
max_connections=20, # Max connections
max_concurrent_requests=10, # Max concurrent requests
idle_timeout=300, # Idle timeout (seconds)
connect_timeout=15, # Connection timeout (seconds)
execute_timeout=120 # Execute timeout (seconds)
)
Multi-Machine Connection
Support simultaneous connection to multiple machines, distinguished by IP address:
SSH connect to 192.168.1.100 port 22 as root with password xxx
SSH connect to 192.168.1.101 port 2222 as admin with password yyy
Switch Target
Switch to 192.168.1.101
View Current Connections
View current connections
Security Mechanisms
Sensitive Operation Confirmation
The following operations require 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
High-Risk Command Blocking
The following commands are blocked by default:
:(){ :|:& };:(fork bomb)- Direct disk formatting commands
Password Security
- Passwords only stored in memory
- Immediately cleared after session ends
- Not written to any configuration file or log
Best Practices
Connection Management
- Reuse Connections: Connection pool automatically reuses existing connections
- Timeout Settings: Adjust timeouts based on network conditions
- Idle Timeout: Default 10 minutes; set shorter for frequent disconnects
Security Recommendations
- Use Key Authentication: Prefer SSH keys over passwords when possible
- Limit Permissions: Grant minimum sudo privileges needed
- Monitor Sessions: Regularly check active connections
- Log Auditing: Review login logs periodically
Performance Optimization
- Batch Commands: Group related commands to reduce connection overhead
- Connection Pool Tuning: Adjust pool size based on concurrent needs
- Command Timeout: Set appropriate timeout values for long-running commands
Notes
Security Warnings
⚠️ Credential Handling:
- Never log or display passwords
- Clear credentials from memory after use
- Use SSH keys for production environments
⚠️ High-Risk Operations:
- Always confirm destructive operations (rm, mkfs, reboot)
- Blocked commands cannot be bypassed
- Review security mechanisms before deployment
Common Issues
| Issue | Cause | Solution |
|---|---|---|
| Connection timeout | Network/firewall | Check network connectivity |
| Authentication failed | Wrong credentials | Verify username/password |
| Command blocked | Security policy | Review command validator rules |
| Pool exhausted | Too many connections | Increase max_connections |
Limitations
- SSH password authentication only (no interactive password prompt)
- Single-user session per connection
- Maximum 50 concurrent connections (configurable)
Troubleshooting
Connection Failed
- Check if IP address and port are correct
- Check if firewall allows the port
- Check if username and password are correct
- Check if SSH service is running on target host
Command Execution Failed
- Check if command syntax is correct
- Check if there is an active connection
- Check if command is blocked by security policy
Disk Merge Failed
- Check if disk is occupied by other processes
- Check if LVM tools are installed
- Check if disk is already mounted
Directory Structure
huawei-cloud-ascend-remote-connect/
├── SKILL.md # Skill definition entry file (required)
├── scripts/ # Scripts directory (required)
│ ├── __init__.py # Module export
│ ├── main.py # Skill entry script (required)
│ ├── executor.py # Command executor
│ ├── session_manager.py # Session manager
│ ├── ssh_client.py # SSH client implementation
│ └── command_validator.py # Command validator
└── references/ # Reference documentation directory
├── troubleshooting.md # Troubleshooting guide
├── verification-method.md # Verification steps
└── iam-policies.md # IAM policies
References
| Document | Description |
|---|---|
| references/troubleshooting.md | Troubleshooting guide |
| references/verification-method.md | Verification steps |
| scripts/main.py | Main entry script |
Author: huawei-cloud
FAQ
What does the huawei-cloud-ascend-remote-connect skill do?
Provides temporary SSH remote connection for Huawei Cloud Ascend devices with dynamic host/port/user/password input (in-memory only), disk management, NPU monitoring, container management, security auditing and log analysis; sensitive operations require user confirmation before execution Use this skillthis skill to remotely connect to Ascend servers, monitor NPU health, manage disks/LVM, or troubleshoot Ascend devices. Triggerer words: SSH, remote, Ascend, NPU, 远程连接, 昇腾, NPU监控
How do I install huawei-cloud-ascend-remote-connect?
Run npx skills add https://github.com/huaweicloud/huaweicloud-skills --skill huawei-cloud-ascend-remote-connect in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/huawei-cloud-ascend-remote-connect/ (personal) or .claude/skills/huawei-cloud-ascend-remote-connect/ (project).
Which AI agents can use huawei-cloud-ascend-remote-connect?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is huawei-cloud-ascend-remote-connect safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains huawei-cloud-ascend-remote-connect?
It is published by huaweicloud in huaweicloud/huaweicloud-skills. It has 321 recorded installs.
More from huaweicloud/huaweicloud-skills
huawei-cloud-terraform-installer
huaweicloud/huaweicloud-skills
Installs Terraform CLI cross-platform with Huawei Cloud mirror support. Use this skill whenever the user mentions installing Terraform, setting up Terraform environment, or when IaC tasks detect missing Terraform. Trigger: install terraform, setup terraform, terraform environment, huaweicloud provider.
huawei-cloud-find-skills
huaweicloud/huaweicloud-skills
Invoke this skill to search, list, query, discover, browse, find and install any Huawei Cloud (华为云) agent skill. Triggers include: "华为云", "华为云有什么skill", "华为云相关skill", "华为云agent skill 市场", "华为云skill类目", "explore Huawei Cloud skills", "show Huawei Cloud skill categories", "does a Huawei Cloud skill exist for...", "which Huawei Cloud skills exist", "搜索华为云技能", "查询华为云skill列表", "有没有管理ECS/OBS/RDS的skill", "帮我找 XX 华为云skill", "介绍 XX Skill 内容", "华为云 XX Skill 具体做什么", "安装华为云Skill".
huawei-cloud-billing-scout
huaweicloud/huaweicloud-skills
Huawei Cloud BSS billing (not AWS/Azure/other clouds; refuses pricing quotes, real-name review, and any non-billing scope): balance, spend, attribution, reconciliation, coupons, stored-value cards, enterprise/partner billing. One-page briefing via hcloud. Use only when the user explicitly mentions 华为云 / Huawei Cloud / BSS and 余额/账单/对账/资源包/代金券/储值卡/企业或伙伴账务; refuses pay, renew, refund, delete.
huawei-cloud-computing-query
huaweicloud/huaweicloud-skills
Queries Huawei Cloud computing resources (ECS/BMS/IMS/AS), Covers ECS instances, flavors, keypairs, quotas, server groups, block devices, NICs, VNC console, BMS bare metal servers/flavors/quotas, IMS images/OS versions/members/quotas, and AS scaling groups/configs/policies/activity logs/lifecycle hooks/warm pools/quotas. No write operations. Use this skill when the user needs to query ECS instance details, list flavors, check BMS availability, browse images, or view auto-scaling group/policy status. Triggers: 弹性云服务器, ECS, 裸金属, BMS, 镜像, IMS, 弹性伸缩, AS, 伸缩组, 伸缩策略, 规格查询, flavor, instance, image, scaling.
huawei-cloud-obs-upload
huaweicloud/huaweicloud-skills
Upload local files or directories to Huawei Cloud OBS (Object Storage Service) buckets, list OBS buckets with capacity and object count, and schedule periodic uploads via crontab. Use this skill when the user wants to: (1) upload a local file or directory to an OBS bucket, (2) list OBS buckets and check their storage capacity and object count, (3) set up a scheduled/periodic upload task to automatically sync a local directory to an OBS bucket. Triggers include: user mentions "OBS", "object storage", "bucket list", "bucket capacity", "upload to OBS", "upload file", "upload directory", "scheduled upload", "periodic upload", "sync to bucket", "对象存储", "桶列表", "桶容量", "上传文件", "上传目录", "定时上传", "OBS管理"
huawei-cloud-terraform-generator
huaweicloud/huaweicloud-skills
Generate Huawei Cloud Terraform configurations and execute deployment with user-guided approval. Use this skill when users want to create Huawei Cloud infrastructure as Terraform, whether they ask explicitly for Terraform or describe goals such as deploying a website, launching an application, or creating network, compute, database, load balancing, or storage resources. Trigger when users mention 创建/create、生成/generate、部署/deploy、配置/configure、使用/use、管理/manage、华为云/Huawei Cloud、Terraform、ECS、VPC、资源/resource、云服务器/ECS、虚拟机/VM、实例/instance、网络/network、负载均衡/ELB、数据库/database、RDS、存储/storage、OBS、桶/bucket、域名/domain、DNS、证书/certificate、SSL、监控/monitoring、日志/log、备份/backup、容器/container、CCE、函数工作流/FunctionGraph
Popular devops & cloud skills
microsoft-foundry
microsoft/azure-skills
Build, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and resources end to end. USE FOR: foundry, azd ai agent, azd provision/deploy, hosted agent scaffold/develop/run/deploy/troubleshoot, prompt agent create, managed harness agent create, GitHub Copilot harness agent, create agent, update agent, add tool to agent, invoke agent, agent insights, evaluate agent, batch eval, continuous eval, continuous monitoring, agent CI/CD, optimize prompt, improve prompt, optimize agent instructions, Agent Optimizer scaffold, dataset curation from traces, deploy model, model fine-tuning (SFT/DPO/RFT), Foundry project, RBAC, role assignment, permissions, quota, capacity, region, deployment failure, AI Services, create Foundry resource, knowledge index, customize deployment, onboard, availability, training-data, grader, distillation, large file upload. DO NOT USE FOR: Azure Functions, App Service, general Azure deploy (use azure-deploy), general Azure prep (use azure
azure-diagnostics
microsoft/azure-skills
Debug Azure production issues on Azure using AppLens, Azure Monitor, resource health, and safe triage. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, container app 503 or target port mismatch, troubleshoot functions, function telemetry missing or stopped after a config/connection-string change, troubleshoot AKS, VM RDP, Linux SSH, VM black screen, can't connect to VM, reset VM password, NSG or firewall blocking, kubectl cannot connect, kube-system/CoreDNS failures, pod pending, crashloop, node not ready, upgrade failures, analyze logs, KQL, insights, image pull failures, cold start issues, health probe failures, resource health, root cause of errors, troubleshoot event hubs, troubleshoot service bus, messaging SDK error, AMQP connection failure, message lock lost, lock renewal during long-running processing, service bus dead letter.
azure-prepare
microsoft/azure-skills
Prepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Terraform), and Dockerfiles for the Azure Developer CLI (azd) workflow. USE ONLY when the user explicitly wants to use azd as the deployment tool, or the project already has an azure.yaml file. DO NOT USE FOR: non-azd deployments, Python App Service code-only deploys (use python-appservice-deploy), or cross-cloud migration (use azure-cloud-migrate). WHEN: prepare app for azd, create azure.yaml, set up azd infrastructure, modernize app for Azure with azd, deploy with azd, function app, timer trigger, service bus trigger, event-driven function, managed identity, generate Bicep, generate Terraform, create and deploy to Azure.
azure-ai
microsoft/azure-skills
Use for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.
azure-deploy
microsoft/azure-skills
Execute Azure deployments for ALREADY-PREPARED applications that have existing .azure/deployment-plan.md and infrastructure files. DO NOT use this skill when the user asks to CREATE a new application — use azure-prepare instead. This skill runs azd up, azd deploy, terraform apply, and az deployment commands with built-in error recovery. Requires .azure/deployment-plan.md from azure-prepare and validated status from azure-validate. WHEN: "run azd up", "run azd deploy", "execute deployment", "push to production", "push to cloud", "go live", "ship it", "bicep deploy", "terraform apply", "publish to Azure", "launch on Azure". DO NOT USE WHEN: "create and deploy", "build and deploy", "create a new app", "set up infrastructure", "create and deploy to Azure using Terraform" — use azure-prepare for these.
azure-validate
microsoft/azure-skills
Pre-deployment validation for Azure readiness. Run deep checks on configuration, infrastructure (Bicep or Terraform), RBAC role assignments, managed identity permissions, and prerequisites before deploying. WHEN: validate my app, check deployment readiness, run preflight checks, verify configuration, check if ready to deploy, validate azure.yaml, validate Bicep, test before deploying, troubleshoot deployment errors, validate Azure Functions, validate function app, validate serverless deployment, verify RBAC roles, check role assignments, review managed identity permissions, what-if analysis, validate Container Apps deployment.