microsoft / microsoft/vscode-remote-release
Cannot connect to windows host because uname is not found
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 469
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Is there an existing issue for this bug?
- I have searched the existing open issues and found none that apply.
- If I find any issue of interest that is related or closed, I will included a link to it in this issue.
Required Troubleshooting Steps
- I have read and performed the troubleshooting steps
- I have tried both values of the
remote.SSH.useLocalServersetting - My issue was not covered in the Tips and Tricks linked from the Troubleshooting Wiki.
- I will include a complete copy of my Remote - SSH logs by running Remote-SSH: Show Log in the command palette or from View > Output in the menu bar
[Optional] Diagnose with Copilot
I asked @remote-ssh but it did not help
In step 2 of the troubleshooting wiki, what was the result of running the generated SSH command verbatim outside of VS Code?
I COULD successfully SSH to the remote machine with the generated SSH command
Remote-SSH Log
Remote-SSH Log
...
[22:39:13.219] Spawned 12201
[22:39:13.220] Using connect timeout of 62 seconds
[22:39:13.332] > local-server-4> Running ssh connection command: ssh -v -T -D 57142 -o ConnectTimeout=60 windows-host.local powershell
[22:39:13.334] > local-server-4> Spawned ssh, pid=12209
[22:39:13.714] stderr> debug1: Server host key: ssh-ed25519 SHA256:q1uMM4sdD/YBS+ZBe636bLJXfwFtaAhSjGTEgCwmTFU
[22:39:13.881] stderr> Authenticated to windows-host.local([192.168.68.111]:22220) using "publickey".
[22:39:14.450] > Windows PowerShell
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
[22:39:14.450] >
[22:39:14.776] > PS C:\Users\Quickemu>
[22:39:14.790] > echo 'ready: 234b978c1266'
[22:39:14.907] > ready: 234b978c1266
[22:39:14.922] > PS C:\Users\Quickemu>
[22:39:14.923] > uname -rsv
[22:39:15.100] Platform: windows
[22:39:15.101] Remote command length: 6676/8192 characters
[22:39:15.108] stderr> At line:1 char:1
[22:39:15.108] stderr> + uname -rsv
[22:39:15.109] stderr> + ~~~~~
[22:39:15.109] stderr> + CategoryInfo : ObjectNotFound: (uname:String) [], CommandNotFoundException
[22:39:15.109] stderr> + FullyQualifiedErrorId : CommandNotFoundException
[22:39:15.110] stderr>
...
Expected Behavior
By default, Windows hosts don't have uname installed and on the path. This requires installing Git Bash, GnuWin32, Cygwin or MSYS2.
It should be possible to connect to a windows host successfully when uname is missing.
Or at the very least this behaviour, and how to fix it, should be documented.
Actual Behavior
When uname is not on the path, connecting to a Windows host fails with:
Failed to connect to the remote extension host server (Error: ExtensionInstallFailed(ExtensionInstallFailed("bash: line 1: C:UsersQuickemu.vscode-servercliserversStable-994fd12f8d3a5aa16f17d42c041e5809167e845aserverbincode-server.cmd: command not found\n")))
Steps To Reproduce
- Connect to a Windows host that doesn't have
unameon the path.
Anything else?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Remote-SSH: Show Log output and reproduce the connection using the generated SSH command on a Windows host where uname is unavailable. Trace the uname -rsv step and the subsequent server startup command; done means Remote-SSH connects successfully without requiring uname, or the required Windows setup is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, vscode
- Domain
- devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100