huawei-cloud-ascend-remote-connect
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHuawei 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
组件关系
| 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 |
| 组件 | 职责 | 核心特性 |
|---|---|---|
| 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 requiredbashpython3 --version # Python3 >= 3.8 python3 -c "import paramiko; print('OK')" # SSH libraryIf not installed:pip3 install --user paramiko cryptography
前提检查:需要Python3 + paramikobashpython3 --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
输入参数
| Parameter | Required | Description |
|---|---|---|
| host | Yes | Target server IP address |
| port | No | SSH port (default: 22) |
| user | Yes | SSH username |
| password | Yes | SSH password |
| 参数 | 是否必填 | 描述 |
|---|---|---|
| host | 是 | 目标服务器IP地址 |
| port | 否 | SSH端口(默认:22) |
| user | 是 | SSH用户名 |
| password | 是 | SSH密码 |
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.pybash
python3 scripts/main.pyUsage Instructions
使用说明
Connect to Ascend Server
连接昇腾服务器
SSH connect to 192.168.1.100 port 22 as root with password xxxSSH connect to 192.168.1.100 port 22 as root with password xxxExecute Commands
执行命令
NPU Monitoring
NPU监控
npu-smi info
Check NPU status
NPU health checknpu-smi info
Check NPU status
NPU health checkSystem Management
系统管理
Check CPU and memory
df -h
top -bn1Check CPU and memory
df -h
top -bn1Connection Management
连接管理
Show current connections
Switch to 192.168.1.101
Disconnect SSHShow current connections
Switch to 192.168.1.101
Disconnect SSHOutput 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
基础验证步骤
-
Environment Checkbash
python3 --version # Verify Python 3.8+ python3 -c "import paramiko" # Verify paramiko installed -
Connection Testbash
python3 scripts/main.py --host <test-ip> --port 22 --user root --password <test-pwd> --command "echo test" -
NPU Monitoring Testbash
python3 scripts/main.py --host <ascend-ip> --user root --password <pwd> --command "npu-smi info"
-
环境检查bash
python3 --version # 验证Python 3.8+ python3 -c "import paramiko" # 验证paramiko已安装 -
连接测试bash
python3 scripts/main.py --host <test-ip> --port 22 --user root --password <test-pwd> --command "echo test" -
NPU监控测试bash
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.
| 测试用例 | 预期输出 |
|---|---|
| 环境检查 | 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:
- : Command dispatch entry
handle_command(text) - : Establish SSH connection
_connect(info) - : Detect unmounted disks
_detect_disks() - : Configure auto-mount on boot
_handle_auto_mount(text) - : Disk merge confirmation
_confirm_disk_merge(info)
-
session_manager.py: Session manager
- Function: Manage multiple concurrent SSH sessions
- Core methods:
- : Create new session
create_session(host, port, username, password) - : Execute command in active session
execute_command(command) - : Switch to specified host session
switch_session(host) - : Close current session
close_session() - : Get all session information
get_session_info()
-
ssh_client.py: SSH client
- Function: Low-level SSH connection implementation, supports password and key authentication
- Core methods:
- : Establish SSH connection
connect() - : Execute remote command
exec_command(command) - : Close connection
close()
-
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) - :建立SSH连接
_connect(info) - :检测未挂载磁盘
_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连接实现,支持密码和密钥认证
- 核心方法:
- :建立SSH连接
connect() - :执行远程命令
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
undefinedUsing 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 yyySwitch Target
切换目标
Switch to 192.168.1.101Switch to 192.168.1.101View Current Connections
查看当前连接
View current connectionsView current connectionsSecurity 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
连接管理
- 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
- 复用连接:连接池自动复用现有连接
- 超时设置:根据网络状况调整超时时间
- 空闲超时:默认10分钟;频繁断开场景可设置更短
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
- 使用密钥认证:尽可能优先使用SSH密钥而非密码
- 限制权限:仅授予所需的最小Sudo权限
- 监控会话:定期检查活跃连接
- 日志审计:定期查看登录日志
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
⚠️ 凭证处理:
- 切勿记录或显示密码
- 使用后从内存中清除凭证
- 生产环境使用SSH密钥
⚠️ 高危操作:
- 始终确认破坏性操作(rm、mkfs、reboot)
- 被拦截的命令无法绕过
- 部署前请审核安全机制
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 |
| 问题 | 原因 | 解决方案 |
|---|---|---|
| 连接超时 | 网络/防火墙问题 | 检查网络连通性 |
| 身份验证失败 | 凭证错误 | 验证用户名/密码 |
| 命令被拦截 | 安全策略限制 | 查看命令验证器规则 |
| 连接池耗尽 | 连接数过多 | 增加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 policieshuawei-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
参考资料
| Document | Description |
|---|---|
| references/troubleshooting.md | Troubleshooting guide |
| references/verification-method.md | Verification steps |
| scripts/main.py | Main entry script |
Author: huawei-cloud
| 文档 | 描述 |
|---|---|
| references/troubleshooting.md | 故障排查指南 |
| references/verification-method.md | 验证步骤 |
| scripts/main.py | 主入口脚本 |
作者: huawei-cloud