microsoft / microsoft/vscode-remote-release

SSH fails with LocalNetworkPermissionMacOS, but VisualStudio does not show up at "Settings -> Privacy & Security -> Local Network"

Open
#11,762 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

ssh
Dominant language
Dockerfile
Stars
4.2k
Forks
470
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.useLocalServer setting
  • 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. (it actually failed ;-) )
Image

In step 2 of the troubleshooting wiki, what was the result of running the generated SSH command verbatim outside of VS Code?

I did not try step 2 of the troubleshooting steps

Remote-SSH Log
Remote-SSH Log

[11:54:59.019] Log Level: 2
[11:54:59.031] SSH Resolver called for "ssh-remote+7b22686f73744e616d65223a225a69737465726e65227d", attempt 1
[11:54:59.034] remote.SSH.useLocalServer = true
[11:54:59.034] remote.SSH.useExecServer = true
[11:54:59.035] remote.SSH.bindHost = {}
[11:54:59.035] remote.SSH.path = 
[11:54:59.035] remote.SSH.configFile = 
[11:54:59.035] remote.SSH.useFlock = true
[11:54:59.035] remote.SSH.lockfilesInTmp = false
[11:54:59.035] remote.SSH.localServerDownload = auto
[11:54:59.035] remote.SSH.remoteServerListenOnSocket = false
[11:54:59.035] remote.SSH.defaultExtensions = []
[11:54:59.035] remote.SSH.defaultExtensionsIfInstalledLocally = []
[11:54:59.035] remote.SSH.loglevel = 2
[11:54:59.036] remote.SSH.enableDynamicForwarding = true
[11:54:59.036] remote.SSH.enableRemoteCommand = false
[11:54:59.036] remote.SSH.serverPickPortsFromRange = {}
[11:54:59.036] remote.SSH.serverInstallPath = {}
[11:54:59.036] remote.SSH.permitPtyAllocation = false
[11:54:59.036] remote.SSH.preferredLocalPortRange = undefined
[11:54:59.036] remote.SSH.useCurlAndWgetConfigurationFiles = false
[11:54:59.036] remote.SSH.experimental.chat = true
[11:54:59.036] remote.SSH.experimental.enhancedSessionLogs = true
[11:54:59.036] remote.SSH.httpProxy = {"*":""}
[11:54:59.037] remote.SSH.httpsProxy = {"*":""}
[11:54:59.040] VS Code version: 1.118.1
[11:54:59.040] Remote-SSH version: remote-ssh@0.124.0
[11:54:59.040] darwin arm64
[11:54:59.048] SSH Resolver called for host: Zisterne
[11:54:59.048] Setting up SSH remote "Zisterne"
[11:54:59.055] Acquiring local install lock: /var/folders/z1/v5_xtthx4xxd0x6y243d2r2r0000gn/T/vscode-remote-ssh-1aab5d25-install.lock
[11:54:59.055] Looking for existing server data file at /Users/dirkmika/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-1aab5d25-034f571df509819cc10b0c8129f66ef77a542f0e-0.124.0-es/data.json
[11:54:59.055] No existing data file
[11:54:59.056] Using commit id "034f571df509819cc10b0c8129f66ef77a542f0e" and quality "stable" for server
[11:54:59.056] Extensions to install: 
[11:54:59.059] Install and start server if needed
[11:54:59.061] PATH: /opt/local/bin:/opt/local/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/pkg/env/global/bin:/Library/Apple/usr/bin:/Users/dirkmika/.cargo/bin:$HOME/Library/Android/sdk/cmdline-tools/latest/bin:$HOME/Documents/Projects/SDKs/Flutter/flutter/bin:/opt/homebrew/opt/python@3.14/libexec/bin
[11:54:59.061] Checking ssh with "ssh -V"
[11:54:59.069] > OpenSSH_10.3p1, LibreSSL 3.3.6

[11:54:59.071] askpass server listening on /var/folders/z1/v5_xtthx4xxd0x6y243d2r2r0000gn/T/vscode-ssh-askpass-f5f102d9f02e060f6f0074e0f69e80.sock
[11:54:59.071] Spawning local server with {"serverId":1,"ipcHandlePath":"/var/folders/z1/v5_xtthx4xxd0x6y243d2r2r0000gn/T/vscode-ssh-askpass-58f97862112b9ac2e09b2d417087bd.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","58857","-o","ConnectTimeout=15","Zisterne"],"serverDataFolderName":".vscode-server","dataFilePath":"/Users/dirkmika/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-1aab5d25-034f571df509819cc10b0c8129f66ef77a542f0e-0.124.0-es/data.json"}
[11:54:59.071] Local server env: {"SSH_AUTH_SOCK":"/var/run/com.apple.launchd.9sJQ8dJgRb/Listeners","SHELL":"/bin/zsh","DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/dirkmika/.vscode/extensions/ms-vscode-remote.remote-ssh-0.124.0/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin)","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"","VSCODE_SSH_ASKPASS_MAIN":"/Users/dirkmika/.vscode/extensions/ms-vscode-remote.remote-ssh-0.124.0/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/z1/v5_xtthx4xxd0x6y243d2r2r0000gn/T/vscode-ssh-askpass-f5f102d9f02e060f6f0074e0f69e80.sock"}
[11:54:59.072] Spawned 58868
[11:54:59.072] Using connect timeout of 17 seconds
[11:54:59.184] > local-server-1> Running ssh connection command: ssh -v -T -D 58857 -o ConnectTimeout=15 Zisterne
[11:54:59.186] > local-server-1> Spawned ssh, pid=58875
[11:54:59.192] stderr> ssh: connect to host 10.1.1.82 port 22: No route to host
[11:54:59.193] > local-server-1> ssh child died, shutting down
[11:54:59.198] Local server exit: 0
[11:54:59.198] Received install output: local-server-1> Running ssh connection command: ssh -v -T -D 58857 -o ConnectTimeout=15 Zisterne
local-server-1> Spawned ssh, pid=58875
ssh: connect to host 10.1.1.82 port 22: No route to host
local-server-1> ssh child died, shutting down

[11:54:59.198] WARN: $PLATFORM is undefined in installation script output.  Errors may be dropped.
[11:54:59.199] Resolver error: Error: No route to host
    at y.Offline (/Users/dirkmika/.vscode/extensions/ms-vscode-remote.remote-ssh-0.124.0/out/extension.js:2:722286)
    at /Users/dirkmika/.vscode/extensions/ms-vscode-remote.remote-ssh-0.124.0/out/extension.js:2:718774
    at t.handleInstallOutput (/Users/dirkmika/.vscode/extensions/ms-vscode-remote.remote-ssh-0.124.0/out/extension.js:2:718917)
    at e (/Users/dirkmika/.vscode/extensions/ms-vscode-remote.remote-ssh-0.124.0/out/extension.js:2:776405)
    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
    at async /Users/dirkmika/.vscode/extensions/ms-vscode-remote.remote-ssh-0.124.0/out/extension.js:2:801487
    at async t.withShowDetailsEvent (/Users/dirkmika/.vscode/extensions/ms-vscode-remote.remote-ssh-0.124.0/out/extension.js:2:805164)
    at async /Users/dirkmika/.vscode/extensions/ms-vscode-remote.remote-ssh-0.124.0/out/extension.js:2:773148
    at async P (/Users/dirkmika/.vscode/extensions/ms-vscode-remote.remote-ssh-0.124.0/out/extension.js:2:771214)
    at async t.resolveWithLocalServer (/Users/dirkmika/.vscode/extensions/ms-vscode-remote.remote-ssh-0.124.0/out/extension.js:2:772701)
    at async A (/Users/dirkmika/.vscode/extensions/ms-vscode-remote.remote-ssh-0.124.0/out/extension.js:2:798291)
    at async t.resolve (/Users/dirkmika/.vscode/extensions/ms-vscode-remote.remote-ssh-0.124.0/out/extension.js:2:802578)
    at async /Users/dirkmika/.vscode/extensions/ms-vscode-remote.remote-ssh-0.124.0/out/extension.js:2:1095642
[11:54:59.203] ------




[11:54:59.203]  ---------- [Session Summary] ----------- 
[11:54:59.203] [LocalNetworkPermissionMacOS]: No route found to remote machine with a local IPv4 address. 
[11:54:59.203] [OfflineError]: Error: OfflineError (No route to host)
[11:54:59.203]  ---------------------------------------- 
[11:59:35.571] Picking SSH host
[11:59:38.444] ConfigFileWatcher: start watching file:///Users/dirkmika/.ssh/config
[11:59:38.444] ConfigFileWatcher: adding save listener
[11:59:38.444] ConfigFileWatcher: adding close listener
[11:59:44.877] ConfigFileWatcher: saving file:///Users/dirkmika/.ssh/config
[11:59:44.877] ConfigFileWatcher: firing change event for file:///Users/dirkmika/.ssh/config
[11:59:48.240] ConfigFileWatcher: closing file:///Users/dirkmika/.ssh/config
[11:59:48.240] ConfigFileWatcher: stop watching file:///Users/dirkmika/.ssh/config
[11:59:48.240] ConfigFileWatcher: removing save listener
[11:59:48.240] ConfigFileWatcher: removing close listener
[11:59:53.133] Picking SSH host
[11:59:54.628] Selected Zisterne
[12:20:47.176] Picking SSH host
[12:20:48.274] Selected Zisterne

Expected Behavior

I expect no error. ;-)

Actual Behavior

Visual Studio tells me the LocalNetworkPermissionMacOS error, but I can't enable Visual Studio in settings.

Image
Steps To Reproduce

Try to connect to a configured ssh server.

Anything else?

ssh works without problems when I connect using iTerm2 or ssh on the command line.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the connection through Remote-SSH and capture the Remote-SSH: Show Log output, focusing on the LocalNetworkPermissionMacOS and OfflineError entries. Compare this with the successful iTerm2 or command-line SSH connection; done means a configured SSH server can be reached without the misleading permission error.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, vscode
Domain
devtools, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.