Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

huawei-cloud-ecs-passwordless-login

БесплатноБез исполняемых скриптовНе проверен

Configure passwordless SSH login to Huawei Cloud ECS instances using COC (Cloud Operations Center). Automates IAM agency authorization, SSH key pair…

huaweicloudskillот huaweicloudskill564 установки в других каталогах

Об этом скилле

Huawei Cloud ECS Passwordless Login

Overview

Configure passwordless SSH login to Huawei Cloud ECS using COC (Cloud Operations Center) with a 7-step automated workflow:

  1. IAM Authorization — Create the ServiceAgencyForCOC agency for COC service and bind 4 required roles; skip entirely if agency already exists (HTTP 409)
  2. Key Generation — Generate a local Ed25519 SSH key pair
  3. Script Creation — Create or reuse a parameterized COC script that deploys the public key
  4. Script Execution — Execute the script on one or many target ECS instances via COC (batch; each target's region and resource_id are resolved via the COC CLI ListResources)
  5. SSH Test — Verify passwordless SSH connection to every target ECS
  6. Persistent Connection — Establish SSH ControlMaster so the agent can continue SSH access after keys are cleaned up
  7. Security Cleanup — After 60 seconds, automatically remove keys from remote authorized_keys, delete the local key pair, and clean up the COC script

Tool chain: hcloud CLI (KooCLI) + local SSH tools. Deployment is handled through COC script execution only.

Region model: COC is a global-level service supporting only cn-north-4 (China site) and ap-southeast-3 (International site). Target ECS instances may live in different regions (batch). Use coc_region for all COC/IAM API calls and for target resolution via COC ListResources — target resolution never needs the ECS region in advance; each target's actual region is returned by the ListResources response. See Notes for details.

Prerequisites

  • hcloud CLI (KooCLI) installed and authenticated with AK/SK — see CLI Installation Guide
  • IAM user with sufficient permissions to create agencies and operate COC — see IAM Policies
  • SSH client and ssh-keygen available locally
  • Target ECS instance ID(s) or elastic IP(s) as comma-separated lists (each ECS must be in ACTIVE state)
  • ECS pre-installed uniagent — COC script execution depends on the uniagent agent pre-installed on ECS. Check uniagent status via hcloud COC ListResources command, inspect the agent_state field to confirm the agent is running properly

Security

  • Never expose private key content in conversation or output
  • Never log or persist private keys beyond the 60s window
  • Cleanup is mandatory — if SSH test succeeds, keys MUST be removed within cleanup_delay seconds
  • Removing the public key from authorized_keys only blocks new SSH connections; existing sessions are NOT interrupted
  • If SSH test fails, preserve keys for debugging and do NOT trigger cleanup

Workflow

Execute the numbered steps below in order. See Core Commands section for the exact command syntax to use at each step.

1. IAM Authorization

One-time per-account setup. Authorize COC to operate on your ECS instances.

All IAM calls in this step run against the COC-supported region (coc_region): cn-north-4 (China) or ap-southeast-3 (International).

  1. Get domain ID — Call KeystoneListAuthDomains and extract the id.
  2. Create agency — Call CreateAgency with name ServiceAgencyForCOC and trust domain op_svc_coc.
    • HTTP 200 — New agency created. Record agency.id. Proceed to step 3.
    • HTTP 409 — Agency already exists. Skip the entire IAM phase (steps 3–4) and jump to Step 2 (Key Generation).
  3. Find role IDs — Call KeystoneListPermissions for each of the 4 roles: IAM ReadOnlyAccess, RMS ReadOnlyAccess, DCS UserAccess, COCServiceAgencyPolicy. If any role is not found, stop — the account may lack access.
  4. Bind roles — Call AssociateAgencyWithAllProjectsPermission for each of the 4 role IDs.
    • HTTP 200 — Bound successfully.
    • HTTP 409 — Already bound, skip and continue.

2. Generate Local SSH Key Pair

Generate an Ed25519 key pair. The comment coc-temp-key is the cleanup marker. Only Ed25519 keys are supported — RSA, ECDSA, and DSA key types are NOT supported; do not attempt to generate or deploy them, as they are incompatible with this skill.

Record the key fingerprint. Never display the private key content.

3. Create or Reuse COC Script

  1. Check existing — Call ListScripts --cli-region=<coc_region> with --name_like="coc_ssh_key_setup". If found, record script_uuid and skip step 2.
  2. Create new — Write a JSON file with the script content, then call CreateScript --cli-region=<coc_region> --cli-jsonInput=<file>. Use --cli-jsonInput (not inline --content) to avoid shell quoting issues with special characters in the script body. Record the returned script_uuid.

4. Execute Script on Target ECS

Executes the deploy script across the batch of target ECS instances. COC supports up to 200 hosts per execution and 10 hosts per batch (batch_index/rotation_strategy); split targets into batches of ≤10 accordingly

Полный SKILL.md на ClawHub

Установить huawei-cloud-ecs-passwordless-login в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл huawei-cloud-ecs-passwordless-login?

Configure passwordless SSH login to Huawei Cloud ECS instances using COC (Cloud Operations Center). Automates IAM agency authorization, SSH key pair generation, COC script deployment to one or many target ECS instances (batch), SSH connection testing, and automatic security cleanup after 60 seconds (removing keys from both local and remote). 触发词: 免密登录, COC SSH, ECS key login, SSH key deployment, passwordless SSH

Как установить скилл huawei-cloud-ecs-passwordless-login?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл huawei-cloud-ecs-passwordless-login запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить huawei-cloud-ecs-passwordless-login с