You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VSCode Version: 1.67.0
What type of remote connection you were using: SSH
Remote - SSH Version: 0.78.0
Local OS: Darwin x64 21.4.0
Remote OS Version: Windows 10.0.22000.613
Steps to reproduce:
In command palette, select Remote-SSH: Connect to Host...
Type in user@host where user contains backslash.
Background
I am trying to connect to a windows device using vscode via ssh, and my windows account is an AAD account.
Problem
According to this comment, to connect to a windows Azure AD account via SSH, a workaround is to use connection with format ssh azuread\user@microsoft.com@ipaddress. This format contains backslash \, which will be rejected by VSCode remote SSH extension.
Workaround
I tried to remove the backslash in ~/.vscode/extensions/ms-vscode-remote.remote-ssh-0.78.0/out/extension.js:1:672307,
change const V="'\"!%\r\n".split(""); in function assertValidHost, removing the first \ character, and then it worked perfectly. Which means in some case \ could be part of a valid host name.
Another workaround is to manually edit ssh config, add host username with backslash, then connect to that host. (#6172 )
Since ssh config allows user name with backslash, does assertValidHost reject backslash make sense?
The text was updated successfully, but these errors were encountered:
VSCode Version: 1.67.0
What type of remote connection you were using: SSH
Remote - SSH Version: 0.78.0
Local OS: Darwin x64 21.4.0
Remote OS Version: Windows 10.0.22000.613
Steps to reproduce:
Background
I am trying to connect to a windows device using vscode via ssh, and my windows account is an AAD account.
Problem
According to this comment, to connect to a windows Azure AD account via SSH, a workaround is to use connection with format
ssh azuread\user@microsoft.com@ipaddress
. This format contains backslash\
, which will be rejected by VSCode remote SSH extension.Workaround
I tried to remove the backslash in
~/.vscode/extensions/ms-vscode-remote.remote-ssh-0.78.0/out/extension.js:1:672307
,change
const V="'\"!%\r\n".split("");
in functionassertValidHost
, removing the first\
character, and then it worked perfectly. Which means in some case\
could be part of a valid host name.Another workaround is to manually edit ssh config, add host username with backslash, then connect to that host. (#6172 )
Since ssh config allows user name with backslash, does
assertValidHost
reject backslash make sense?The text was updated successfully, but these errors were encountered: