Back to skills
extension
Category: Development & EngineeringNo API key required

ssh-config-tool

自动化 SSH 密钥生成、公钥上传和 SSH 配置设置。专用于 AI Coding 工具(如 Trae、Cursor、CloudCode 等)连接到远程云服务器的 SSH Remote 功能。

personAuthor: chenyjinghubgithub

SSH Config Tool

This skill automates the configuration of SSH remote connections, including:

  • Generating SSH key pairs (Ed25519)
  • Uploading public keys to remote servers
  • Creating local SSH config entries

When to Use

Use this skill when:

  • User wants to connect to a remote cloud server (Alibaba Cloud, Tencent Cloud, etc.)
  • User needs to configure SSH keys for passwordless authentication
  • User is setting up Remote-SSH for VSCode/Trae/Cursor
  • User asks to configure SSH connection automatically

Bin Directory

The CLI tool is located at: bin/ssh-config-tool.exe

Usage

Auto Mode (Recommended)

Complete SSH configuration in one command:

ssh-config-tool auto --host <IP> --port <PORT> --username <USER> --password <PASS> [--hostname <NAME>] [--key-name <KEY>]

Example:

ssh-config-tool auto --host 192.168.81.129 --port 22 --username root --password chenyj --hostname my_server

Step-by-Step Mode

Step 1: Generate SSH Key Pair

ssh-config-tool generate --host <IP> --username <USER> [--key-name id_ed25519] [--force]

Step 2: Upload Public Key to Server

ssh-config-tool upload --host <IP> --port <PORT> --username <USER> --password <PASS> [--key-name id_ed25519]

Step 3: Create SSH Config

ssh-config-tool config --host <IP> --port <PORT> --username <USER> [--hostname <NAME>] [--key-name id_ed25519]

Parameters

| Parameter | Description | Required | |-----------|-------------|----------| | --host | Server IP address | Yes (for auto/config/upload) | | --port | SSH port (default: 22) | No | | --username | SSH username | Yes | | --password | SSH password | Yes (for auto/upload) | | --hostname | Connection name in SSH config | No (defaults to IP) | | --key-name | SSH key file name | No (default: id_ed25519) | | --force | Force regenerate key | No |

Output

The tool will:

  1. Generate SSH key pair at ~/.ssh/<key-name>
  2. Upload public key to server's ~/.ssh/authorized_keys
  3. Create/update SSH config at ~/.ssh/config

Post-Configuration

After successful configuration, you can connect to the server using:

  • CLI: ssh <hostname> or ssh <IP>
  • VSCode/Trae/Cursor: Install "Remote - SSH" plugin and connect using the hostname

Exit Codes

  • 0: Success
  • 1: Failure
  • 130: Cancelled by user (Ctrl+C)