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:
- Generate SSH key pair at
~/.ssh/<key-name> - Upload public key to server's
~/.ssh/authorized_keys - Create/update SSH config at
~/.ssh/config
Post-Configuration
After successful configuration, you can connect to the server using:
- CLI:
ssh <hostname>orssh <IP> - VSCode/Trae/Cursor: Install "Remote - SSH" plugin and connect using the hostname
Exit Codes
0: Success1: Failure130: Cancelled by user (Ctrl+C)
Scan to join WeChat group