VS Code SSH 用户名不能包含字符 \

Ser*_*nov 5 ssh visual-studio-code

在 Windows 远程主机中,我的用户名类似于WORK\username,当我从 Windows 控制台连接时:

ssh WORK\username@hostname
Run Code Online (Sandbox Code Playgroud)

一切安好。我还可以使用双斜杠从 WSL 连接:

ssh WORK\\username@hostname
Run Code Online (Sandbox Code Playgroud)

但我无法从 VS Code 连接。我有一个错误:

Could not establish connection to "hostname": SSH user name cannot include the character \.
Run Code Online (Sandbox Code Playgroud)

怎么办呢,我尝试过用不同的方式来逃避斜线,但没有成功。

我的 VS Code 版本是1.59.1.

jeb*_*jeb 1

当用户名存储在~/.ssh/config中时可以解决

HOST myServer
   hostname example.com
   USER WORK\username
Run Code Online (Sandbox Code Playgroud)

显然,连接应该从远程资源管理器启动。

在 Windows 和 Linux 上使用 VS Code 版本 1.59.1 进行了成功测试