Skip to content

OpenSSH server service is not starting #2328

Open
@roshan9951

Description

@roshan9951

Prerequisites

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

Steps to reproduce

Image

After installing the OpenSSH server on Windows Server 2022, I am not able to start the service and getting the above error.

We have tried the below workaround but it didn't work.

https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.proofpoint.com%2Fv2%2Furl%3Fu%3Dhttps-3A__support.microsoft.com_en-2Dus_topic_december-2D10-2D2024-2Dkb5048661-2Dos-2Dbuild-2D17763-2D6659-2D68e48f87-2D3b78-2D4dd3-2Db249-2D19a47a0b4d6a%26d%3DDwMGaQ%26c%3DcCoa5WWAB7EEETJScYfkXg%26r%3DC1LfSSuQU9gUdIpesvyIC-dgoOk3dq8PHtI_bu_-SY8%26m%3DBnrcTSdeL2RDI4mwYPouslpb7N5w3n8bQrXpuhaCMTmEOxKKgDcu6WHDKsO2d6Jg%26s%3DM0OfChKBGjxIb2t6qfjbThnlP14b_MRZmuHodEkWC7M%26e%3D&data=05%7C02%7CRoshan.Kumar.Singh-extern%40hcob-bank.com%7C8162aa554c9b422e0c0f08dd469e8937%7C8fe05baef97444a492c51a20a4a10daf%7C0%7C0%7C638744368925698576%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=BSvmPnshHAWJFqCnLLdl29c0ozYzZH5DM0ntH3WzJOE%3D&reserved=0

https://github.com/PowerShell/Win32-OpenSSH/wiki/Security-protection-of-various-files-in-Win32-OpenSSH

https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_keymanagement

Expected behavior

The OpenSSH server service should start and ssh connection from remote machine should work properly.

Actual behavior

The OpenSSH service is failing when we are trying to start it.

Error details

PS C:\Windows\system32> Get-Service sshd

Status   Name               DisplayName
------   ----               -----------
Start... sshd               OpenSSH SSH Server


PS C:\Windows\system32> Start-Service sshd
WARNING: Waiting for service 'OpenSSH SSH Server (sshd)' to start...
WARNING: Waiting for service 'OpenSSH SSH Server (sshd)' to start...
WARNING: Waiting for service 'OpenSSH SSH Server (sshd)' to start...
WARNING: Waiting for service 'OpenSSH SSH Server (sshd)' to start...
WARNING: Waiting for service 'OpenSSH SSH Server (sshd)' to start...
WARNING: Waiting for service 'OpenSSH SSH Server (sshd)' to start...
WARNING: Waiting for service 'OpenSSH SSH Server (sshd)' to start...
WARNING: Waiting for service 'OpenSSH SSH Server (sshd)' to start...
WARNING: Waiting for service 'OpenSSH SSH Server (sshd)' to start...
WARNING: Waiting for service 'OpenSSH SSH Server (sshd)' to start...
WARNING: Waiting for service 'OpenSSH SSH Server (sshd)' to start...
WARNING: Waiting for service 'OpenSSH SSH Server (sshd)' to start...
Start-Service : Failed to start service 'OpenSSH SSH Server (sshd)'.
At line:1 char:1
+ Start-Service sshd
+ ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service], ServiceCommandException
    + FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand

PS C:\Windows\system32> ssh -V
OpenSSH_for_Windows_9.8p1 Win32-OpenSSH-GitHub, LibreSSL 3.9.2

Environment data

PS C:\Windows\system32> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.20348.2849
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.20348.2849
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Version

OpenSSH_for_Windows_9.8p1 Win32-OpenSSH-GitHub, LibreSSL 3.9.2

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions