PowerShell / PowerShell/Win32-OpenSSH

sshd.exe hanging to start up

Open
#1,999 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-sshd Investigate
Dominant language
No language data
Stars
8.3k
Forks
819
PR merge metrics
No merged PRs in 30d

Description

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

Start sshd.exe to open Port 22 for SSH/SFTP connections

Expected behavior
Port 22 is open and you can connect with ssh or sftp to the server
Actual behavior
sshd.exe is not starting correctly. It takes a long time to open port 22. The host belongs to a Windows domain.

I started in debug mode, and noticed that it takes a long time to log this line:
debug1: get_passwd: LookupAccountName() failed: 1788.
Error details
Full log:

debug2: load_server_config: filename PROGRAMDATA\ssh/sshd_config
debug2: load_server_config: done config len = 291
debug2: parse_server_config: config PROGRAMDATA\ssh/sshd_config len 291
debug3: PROGRAMDATA\ssh/sshd_config:25 setting SyslogFacility LOCAL0
debug3: PROGRAMDATA\ssh/sshd_config:26 setting LogLevel DEBUG3
debug3: PROGRAMDATA\ssh/sshd_config:40 setting AuthorizedKeysFile .ssh/authorized_keys
debug3: PROGRAMDATA\ssh/sshd_config:81 setting Subsystem sftp sftp-server.exe
debug3: checking syntax for 'Match Group administrators'
debug1: sshd version OpenSSH_for_Windows_7.9, LibreSSL 3.4.3
debug1: get_passwd: LookupAccountName() failed: 1788.
Environment data
-
Version

V8.9.1.0p1-Beta / Windows Server 2016 Datacenter

Visuals

No response

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 startup delay for sshd.exe on Windows Server 2016 using the reported PROGRAMDATA\ssh/sshd_config and DEBUG3 logging. Begin with the delay around get_passwd and LookupAccountName() error 1788; done means sshd.exe starts promptly, opens port 22, and accepts SSH or SFTP connections.

Written by the indexing model from the issue text.

Assessment

Domain
networking, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.