Skip to content

[Bug]: symlink in OpenSSH service binPath causes issues #7665

@SwingURM

Description

@SwingURM

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues/PRs to ensure it has not already been reported or fixed.
  • I have verified that I am using the latest version of Scoop and corresponding bucket.

Package Name

openssh

Expected/Current Behaviour

Automatic startup at boot is usable and no privilege needed to start the service.

Problem

When installing sshd/ssh-agent as Windows services via install-sshd.ps1, the installer sets MitigationOptions to 0x10 in the registry, which prevents the service from resolving symlink/junction paths. Since Scoop uses a current junction (e.g. E:\Scoop\apps\openssh\current) as $dir, the services fail to start without sudo.
Even though we can use gsudo Start-Service to manually start the service, this does not help with automatic startup at boot — the service will still fail to start automatically.

Steps to Reproduce

scoop install openssh
WARN  Scoop uses 'aria2c' for multi-connection downloads.
WARN  Should it cause issues, run 'scoop config aria2-enabled false' to disable it.
WARN  To disable this warning, run 'scoop config aria2-warning-enabled false'.
Installing 'openssh' (10.0.0.0p2) [64bit] from 'main' bucket
Loading OpenSSH-Win64.zip from cache.
Checking hash of OpenSSH-Win64.zip ... ok.
Extracting OpenSSH-Win64.zip ... done.
Linking E:\Scoop\apps\openssh\current => E:\Scoop\apps\openssh\10.0.0.0p2
Creating shim for 'scp'.
Creating shim for 'sftp'.
Creating shim for 'sftp-server'.
Creating shim for 'ssh'.
Creating shim for 'ssh-add'.
Creating shim for 'ssh-agent'.
Creating shim for 'ssh-keygen'.
Creating shim for 'ssh-keyscan'.
Creating shim for 'ssh-shellhost'.
Creating shim for 'sshd'.
'openssh' (10.0.0.0p2) was installed successfully!
Notes
-----
Windows 10 or higher includes this build of OpenSSH in the system itself, hence it is recommended to use the system
OpenSSH there.
Run 'sudo E:\Scoop\apps\openssh\current\install-sshd.ps1' to install sshd and ssh-agent as a service.
Run 'sudo E:\Scoop\apps\openssh\current\uninstall-sshd.ps1' to uninstall the services.

sshd -v
Pop up error num 0xc00004bc.

Possible Solution

Rewrites sshd and ssh-agent service binPath to the real absolute path, so the services can start correctly without privilege.

Scoop and Buckets Version

scoop --version
Current Scoop version:
b588a06e (HEAD -> master, tag: v0.5.3, origin/master, origin/HEAD) chore(release): Bump to version 0.5.3 (resync) (#6436)

'main' bucket:
95e9e55650 (HEAD -> master, origin/master, origin/HEAD) minify: Update to version 2.24.9

'extras' bucket:
41810f36d8 (HEAD -> master, origin/master, origin/HEAD) zen-browser: Update to version 1.18.10b

'versions' bucket:
63aab897e5 (HEAD -> master, origin/master, origin/HEAD) zig-dev: Update to version 0.16.0-dev.2637

Scoop Config

scoop config

root_path                       : E:\Scoop
global_path                     : E:\ScoopApps
last_update                     : 2026/2/22 1:20:27
aria2-enabled                   : True
aria2-split                     : 16
aria2-max-connection-per-server : 16
aria2-min-split-size            : 4M
proxy                           : 127.0.0.1:7897
scoop_branch                    : master
scoop_repo                      : https://github.com/ScoopInstaller/Scoop
debug                           : False

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.5.4
PSEdition                      Core
GitCommitId                    7.5.4
OS                             Microsoft Windows 10.0.26200
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Additional Softwares

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions