Skip to content

Instantly share code, notes, and snippets.

@mhoyer
mhoyer / single-user-msys-sshd.md
Last active March 11, 2024 09:22
Install single-user SSH daemon as Windows service with pure msys tools

Install single-user SSH daemon as Windows service with pure msys tools

WARNING This approach does not enable impersonation. Thus, only a single user account is able to connect through ssh - the same user we use for running the Windows service. At time of writing it seem to only be possible with cygwin or msys2 to achieve multi-user support for sshd under Windows. E.g. https://ghc.haskell.org/trac/ghc/wiki/Building/Windows/SSHD

Requirements

  • Latest Git for Windows. I tried it with v2.6.0. (Note: with v2.5.3 sshd tried to load authorized keys from /c/.ssh instead of ~/.ssh).

Create unprivileged sshd user