Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSI for beta doesn't install ssh-agent #2014

Closed
3 tasks done
hut8 opened this issue Nov 8, 2022 · 3 comments
Closed
3 tasks done

MSI for beta doesn't install ssh-agent #2014

hut8 opened this issue Nov 8, 2022 · 3 comments
Assignees
Labels
Area-ssh-agent Issue-Bug Waiting on Author Need more information to diagnose

Comments

@hut8
Copy link

hut8 commented Nov 8, 2022

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Steps to reproduce

First I followed the directions here on Windows 11 and got the SSH client working: https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=gui -- that package contains an SSH-Agent Windows service:

image

I ran into a bug in the SSH client (having to do with Ctrl+Space) that is fixed in the beta. I removed the OpenSSH "optional features" in the control panel, which (as I expected) also removed the SSH Agent.

Then, I installed the beta using the MSI as per these instructions: https://github.com/PowerShell/Win32-OpenSSH/wiki/Install-Win32-OpenSSH-Using-MSI#1-run-msi-installer

This installs the OpenSSH Server service, but doesn't install the Agent service. There is still an ssh-agent.exe that's in the right directory (C:\Program Files\OpenSSH), but no windows service gets installed. I looked through OpenSSHUtils.psm1 to try to find if there's something there. How do I add the agent service in the beta? I'm reporting this as a bug primarily because it's nowhere in the documentation (that I can find), and also perhaps there's something amiss with the MSI builder where it fails to do the service installer step for the agent (although it does install the server component).

It's very confusing that the development (and hopefully issues) happen here but the Wiki and releases are at https://github.com/powershell/Win32-OpenSSH -- that one has 270+ open issues. Should I be filing issues here?

Expected behavior

The agent service should be installed, just like the server service. Or at least there should be some documentation about how to do this.

Actual behavior

No agent service is installed in the beta.

Error details

No response

Environment data

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

Version

OpenSSH_for_Windows_8.9p1, LibreSSL 3.4.3

Visuals

No response

@tgauth
Copy link
Collaborator

tgauth commented Nov 8, 2022

Yes, sorry it's confusing. Win32-OpenSSH is a legacy repo where we maintain issues/releases, although the active development is here in OpenSSH-Portable.

I'm not able to repro the ssh-agent service not being created via MSI install.

As a workaround, you can use the PowerShell cmdlet New-Service:
New-Service ssh-agent
when prompted, provide the path to ssh-agent.exe:
C:\Program Files\OpenSSH\ssh-agent.exe

Otherwise, can you try rerunning the MSI with logging, as documented in https://learn.microsoft.com/en-us/windows/win32/msi/standard-installer-command-line-options: /L* "<logname>.log"

@hut8
Copy link
Author

hut8 commented Nov 8, 2022

Wow, thanks for such a quick response. #1914 is likely related since I'm using 64-bit. I'll update in a bit.

@floh96
Copy link

floh96 commented Nov 13, 2022

@tgauth i had the same problem when i upgraded openssh via winget I then uninstalled it and installed it via the pwsh script and it worked.

@maertendMSFT maertendMSFT transferred this issue from PowerShell/openssh-portable Dec 12, 2022
@maertendMSFT maertendMSFT added Issue-Bug Area-ssh-agent Waiting on Author Need more information to diagnose labels Dec 12, 2022
@hut8 hut8 closed this as completed Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-ssh-agent Issue-Bug Waiting on Author Need more information to diagnose
Projects
None yet
Development

No branches or pull requests

4 participants