Skip to content

[Bug]: SSH connection and connections.json mapping fail when Host alias contains non-ASCII (Chinese) character #2937

@panwudi

Description

@panwudi

Current Behavior

When defining an SSH connection alias (Host) in ~/.ssh/config that includes UTF-8 characters (e.g., Chinese characters like PROD-服务器), Wave Terminal fails to properly parse the alias or map it to the corresponding configurations in ~/.waveterm/config/connections.json. This causes automatic password injection (ssh:passwordsecretname), wsh initialization, and theme applications to silently fail or the connection to be completely unreachable.

Expected Behavior

Wave Terminal should correctly parse UTF-8 / non-ASCII characters in the ~/.ssh/config file and accurately map them to the corresponding keys in connections.json, applying the theme, password, and wsh settings as it does for pure English aliases.

Workaround / Clue for maintainers
If I strictly rename the Host to use purely English characters (e.g., changing PROD-Baoguan-阿里云 to PROD-Baoguan-Aliyun) in both ~/.ssh/config and connections.json, everything works flawlessly. The password injects successfully, and the theme applies perfectly.
This heavily implies that the regex or the parsing library Wave uses to read the SSH config or map the JSON keys is failing to handle UTF-8 characters properly.

Steps To Reproduce

Steps to reproduce the behavior:

Add an entry in ~/.ssh/config with a Chinese suffix in the Host name.

Map this exact Host name in ~/.waveterm/config/connections.json to apply a theme and a secret password.

Open Wave Terminal, click the connection dropdown, and select PROD-Baoguan-阿里云.

The connection fails to establish, or it prompts for a password, completely ignoring the ssh:passwordsecretname and term:theme defined in connections.json.

Wave Version

Client Version 0.14.0 (202602112358) Update Channel: latest

Platform

macOS

OS Version/Distribution

No response

Architecture

arm64

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmaintainer-interestIndicates maintainer interest after review; merge is likely but not guaranteed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions