huawei-cloud-ascend-remote-connect

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Huawei Cloud Ascend Remote Connection

华为云昇腾(Ascend)远程连接

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.
为华为云昇腾(Ascend)设备提供临时SSH远程连接能力,支持同时连接多台机器。所有敏感操作(删除、修改、移动等)执行前需用户确认。密码仅存储在内存中,会话结束后即销毁。

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    │
└─────────────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────────┐
│                        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
组件职责核心特性
Session Manager管理SSH连接连接池、超时管理、生命周期控制
Command Executor处理用户命令自然语言解析、命令路由、结果格式化
SSH Client建立安全隧道paramiko集成、ControlMaster、身份验证
Command Validator安全管控命令黑名单、确认机制要求

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
  • Ascend NPU管理:直接访问npu-smi进行监控和管理
  • 华为云基础设施:安全SSH访问云服务器和容器
  • 安全合规:仅内存存储凭证、会话隔离

Prerequisites

前提条件

System Requirements

系统要求

  • Python 3.8+
  • paramiko >= 3.4.0
  • 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
前提检查:需要Python3 + paramiko
bash
python3 --version  # Python3 >= 3.8
python3 -c "import paramiko; print('OK')"  # SSH库
若未安装:
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

输入参数

ParameterRequiredDescription
hostYesTarget server IP address
portNoSSH port (default: 22)
userYesSSH username
passwordYesSSH password
参数是否必填描述
host目标服务器IP地址
portSSH端口(默认:22)
userSSH用户名
passwordSSH密码

Parameter Validation

参数验证

  • IP address format: IPv4 (e.g., 192.168.1.100)
  • Port range: 1-65535
  • Username: alphanumeric and underscore
  • Password: non-empty string
  • IP地址格式:IPv4(例如:192.168.1.100)
  • 端口范围:1-65535
  • 用户名:字母数字和下划线
  • 密码:非空字符串

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
以下操作需要用户明确确认:
  • 删除:rm、rmdir
  • 格式化:mkfs、fdisk -d、parted rm
  • 卸载:umount
  • 重启:reboot、shutdown、init 6
  • 关机:poweroff、halt、init 0
  • 删除用户:userdel、groupdel
  • 修改权限:chmod -R、chown -R

IAM Permission Policies

IAM权限策略

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
确保目标服务器已启用SSH服务,且提供的凭证拥有相应权限。
目标服务器上的最低权限要求:
  • SSH访问(端口22或自定义端口)
  • 系统管理操作所需的Sudo权限

Core Workflow

核心工作流

Task 1: Establish SSH Connection

任务1:建立SSH连接

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

Task 2: Interactive Mode

任务2:交互模式

bash
python3 scripts/main.py
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
SSH connect to 192.168.1.100 port 22 as root with password xxx

Execute Commands

执行命令

NPU Monitoring

NPU监控

npu-smi info
Check NPU status
NPU health check
npu-smi info
Check NPU status
NPU health check

System Management

系统管理

Check CPU and memory
df -h
top -bn1
Check CPU and memory
df -h
top -bn1

Connection Management

连接管理

Show current connections
Switch to 192.168.1.101
Disconnect SSH

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                     │
└─────────────────────────────────────────┘
所有命令输出遵循结构化格式:
┌─────────────────────────────────────────┐
│ 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>
[ERROR] <error-code>
Message: <error-description>
Suggestion: <troubleshooting-tip>

Success Indicators

成功标识

  • Exit Code: 0
  • STDOUT: Contains expected output
  • STDERR: Empty or contains only warnings

  • 退出码:0
  • STDOUT:包含预期输出
  • STDERR:为空或仅包含警告信息

Verification Method

验证方法

Basic Verification Steps

基础验证步骤

  1. Environment Check
    bash
    python3 --version  # Verify Python 3.8+
    python3 -c "import paramiko"  # Verify paramiko installed
  2. Connection Test
    bash
    python3 scripts/main.py --host <test-ip> --port 22 --user root --password <test-pwd> --command "echo test"
  3. NPU Monitoring Test
    bash
    python3 scripts/main.py --host <ascend-ip> --user root --password <pwd> --command "npu-smi info"
  1. 环境检查
    bash
    python3 --version  # 验证Python 3.8+
    python3 -c "import paramiko"  # 验证paramiko已安装
  2. 连接测试
    bash
    python3 scripts/main.py --host <test-ip> --port 22 --user root --password <test-pwd> --command "echo test"
  3. NPU监控测试
    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.

测试用例预期输出
环境检查Python版本 >= 3.8,paramiko导入成功
连接测试退出码0,stdout中包含"test"
NPU信息显示NPU设备信息
详细验证流程请参考references/verification-method.md

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
  • main.py:Skill入口文件(必填)
    • 功能:提供交互菜单、统一入口
    • 菜单选项:
      • 建立SSH连接
      • 执行命令
      • 断开连接

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)

  • executor.py:命令执行器(主入口)
    • 功能:解析用户输入,将命令分发至对应处理器
    • 核心方法:
      • handle_command(text)
        :命令分发入口
      • _connect(info)
        :建立SSH连接
      • _detect_disks()
        :检测未挂载磁盘
      • _handle_auto_mount(text)
        :配置开机自动挂载
      • _confirm_disk_merge(info)
        :磁盘合并确认
  • session_manager.py:会话管理器
    • 功能:管理多个并发SSH会话
    • 核心方法:
      • create_session(host, port, username, password)
        :创建新会话
      • execute_command(command)
        :在活跃会话中执行命令
      • switch_session(host)
        :切换至指定主机会话
      • close_session()
        :关闭当前会话
      • get_session_info()
        :获取所有会话信息
  • ssh_client.py:SSH客户端
    • 功能:底层SSH连接实现,支持密码和密钥认证
    • 核心方法:
      • connect()
        :建立SSH连接
      • exec_command(command)
        :执行远程命令
      • close()
        :关闭连接
  • command_validator.py:命令验证器
    • 功能:安全层,过滤危险命令
    • 验证规则:
      • 黑名单:直接拦截(例如:fork bomb)
      • 敏感命令:需要确认(例如:rm -rf、reboot)
      • 白名单:直接执行(例如:ls、cat、df)

Supported Features

支持功能

NPU Management

NPU管理

  • NPU status monitoring (npu-smi)
  • NPU health check
  • NPU configuration viewing
  • NPU状态监控(npu-smi)
  • NPU健康检查
  • NPU配置查看

Disk Management

磁盘管理

  • Disk detection
  • LVM merging
  • Partition mounting
  • Auto-mount on boot
  • Disk health check
  • Free space check
  • 磁盘检测
  • LVM合并
  • 分区挂载
  • 开机自动挂载
  • 磁盘健康检查
  • 剩余空间检查

System Management

系统管理

  • CPU/Memory/Disk monitoring
  • System updates
  • User/permission management
  • Cron job management
  • CPU/内存/磁盘监控
  • 系统更新
  • 用户/权限管理
  • Cron任务管理

Network Management

网络管理

  • Port scanning
  • Firewall configuration
  • Route viewing
  • Network interface configuration
  • DNS troubleshooting
  • 端口扫描
  • 防火墙配置
  • 路由查看
  • 网络接口配置
  • DNS故障排查

Container Management

容器管理

  • Docker installation and management
  • Image management
  • Container management
  • Log viewing
  • Docker Compose operations
  • Docker安装与管理
  • 镜像管理
  • 容器管理
  • 日志查看
  • Docker Compose操作

Security Management

安全管理

  • Login auditing
  • SSH key management
  • High-risk command blocking
  • 登录审计
  • SSH密钥管理
  • 高危命令拦截

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
  • 连接复用:同一目标复用连接,避免重复握手
  • 自动断开:空闲10分钟后自动断开(可配置)
  • 线程安全:支持多线程并发访问
  • 状态查询:查看连接池状态和空闲时间

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
python
undefined
  • 最大连接数限制:默认50,支持多目标机器
  • 请求速率限制:默认最大200并发请求
  • 连接超时:默认10秒
  • 执行超时:默认60秒
  • 健康检查:每30秒检查连接状态,自动断开异常连接
python
undefined

Using connection pool

使用连接池

from ssh_client import get_pool
pool = get_pool() result = pool.execute(conn_info, 'ls -la')
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()
status = pool.get_pool_status()

{

{

'connections': [...],

'connections': [...],

'total_connections': 2,

'total_connections': 2,

'max_connections': 10,

'max_connections': 10,

'max_concurrent_requests': 5,

'max_concurrent_requests': 5,

'statistics': {'total_requests': 100, 'failed_requests': 2, ...}

'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) )

---
pool.configure( max_connections=20, # 最大连接数 max_concurrent_requests=10, # 最大并发请求数 idle_timeout=300, # 空闲超时(秒) connect_timeout=15, # 连接超时(秒) execute_timeout=120 # 执行超时(秒) )

---

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
支持同时连接多台机器,通过IP地址区分:
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
Switch to 192.168.1.101

View Current Connections

查看当前连接

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
以下操作需要用户确认:
  • 删除:rm、rmdir
  • 格式化:mkfs、fdisk -d、parted rm
  • 卸载:umount
  • 重启:reboot、shutdown、init 6
  • 关机:poweroff、halt、init 0
  • 删除用户:userdel、groupdel
  • 修改权限:chmod -R、chown -R

High-Risk Command Blocking

高危命令拦截

The following commands are blocked by default:
  • :(){ :|:& };:
    (fork bomb)
  • Direct disk formatting commands
以下命令默认被拦截:
  • :(){ :|:& };:
    (fork bomb)
  • 直接磁盘格式化命令

Password Security

密码安全

  • Passwords only stored in memory
  • Immediately cleared after session ends
  • Not written to any configuration file or log

  • 密码仅存储在内存中
  • 会话结束后立即清除
  • 不写入任何配置文件或日志

Best Practices

最佳实践

Connection Management

连接管理

  1. Reuse Connections: Connection pool automatically reuses existing connections
  2. Timeout Settings: Adjust timeouts based on network conditions
  3. Idle Timeout: Default 10 minutes; set shorter for frequent disconnects
  1. 复用连接:连接池自动复用现有连接
  2. 超时设置:根据网络状况调整超时时间
  3. 空闲超时:默认10分钟;频繁断开场景可设置更短

Security Recommendations

安全建议

  1. Use Key Authentication: Prefer SSH keys over passwords when possible
  2. Limit Permissions: Grant minimum sudo privileges needed
  3. Monitor Sessions: Regularly check active connections
  4. Log Auditing: Review login logs periodically
  1. 使用密钥认证:尽可能优先使用SSH密钥而非密码
  2. 限制权限:仅授予所需的最小Sudo权限
  3. 监控会话:定期检查活跃连接
  4. 日志审计:定期查看登录日志

Performance Optimization

性能优化

  1. Batch Commands: Group related commands to reduce connection overhead
  2. Connection Pool Tuning: Adjust pool size based on concurrent needs
  3. Command Timeout: Set appropriate timeout values for long-running commands

  1. 批量命令:将相关命令分组,减少连接开销
  2. 连接池调优:根据并发需求调整池大小
  3. 命令超时:为长时间运行的命令设置合适的超时值

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
⚠️ 凭证处理
  • 切勿记录或显示密码
  • 使用后从内存中清除凭证
  • 生产环境使用SSH密钥
⚠️ 高危操作
  • 始终确认破坏性操作(rm、mkfs、reboot)
  • 被拦截的命令无法绕过
  • 部署前请审核安全机制

Common Issues

常见问题

IssueCauseSolution
Connection timeoutNetwork/firewallCheck network connectivity
Authentication failedWrong credentialsVerify username/password
Command blockedSecurity policyReview command validator rules
Pool exhaustedToo many connectionsIncrease max_connections
问题原因解决方案
连接超时网络/防火墙问题检查网络连通性
身份验证失败凭证错误验证用户名/密码
命令被拦截安全策略限制查看命令验证器规则
连接池耗尽连接数过多增加max_connections

Limitations

限制

  • SSH password authentication only (no interactive password prompt)
  • Single-user session per connection
  • Maximum 50 concurrent connections (configurable)

  • 仅支持SSH密码认证(无交互式密码提示)
  • 每个连接对应单用户会话
  • 最大50并发连接(可配置)

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
  • 检查IP地址和端口是否正确
  • 检查防火墙是否允许该端口
  • 检查用户名和密码是否正确
  • 检查目标主机是否运行SSH服务

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

  • 检查磁盘是否被其他进程占用
  • 检查是否安装LVM工具
  • 检查磁盘是否已挂载

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

huawei-cloud-ascend-remote-connect/
├── SKILL.md              # Skill定义入口文件(必填)
├── scripts/              # 脚本目录(必填)
│   ├── __init__.py       # 模块导出
│   ├── main.py           # Skill入口脚本(必填)
│   ├── executor.py       # 命令执行器
│   ├── session_manager.py # 会话管理器
│   ├── ssh_client.py     # SSH客户端实现
│   └── command_validator.py # 命令验证器
└── references/           # 参考文档目录
    ├── troubleshooting.md # 故障排查指南
    ├── verification-method.md # 验证步骤
    └── iam-policies.md   # IAM策略

References

参考资料

DocumentDescription
references/troubleshooting.mdTroubleshooting guide
references/verification-method.mdVerification steps
scripts/main.pyMain entry script
Author: huawei-cloud
文档描述
references/troubleshooting.md故障排查指南
references/verification-method.md验证步骤
scripts/main.py主入口脚本
作者: huawei-cloud