Getting "System error 1067" when installing OpenSSH

I try to install this OpenSSH package on windows Server 2008 R2. I applied all steps (except the firewall one) and all passed succesfully.

When I try this command

net start sshd

I get this error:

The SSHD service is starting. The SSHD service could not be started.

A system error has occurred.

System error 1067 has occurred.

The process terminated unexpectedly.

What could be the problem? I couldn't find any log file. The Security in Windows' Event Viewer only says:

The SSHD service terminated unexpectedly.  It has done this 2 time(s).

When running in debug mode I get this:

--

debug2: load_server_config: filename C:\Users\Administrator\Downloads\OpenSSH-Win32\OpenSSH-Win32/sshd_config

debug2: parse_server_config: config C:\Users\Administrator\Downloads\OpenSSH-Win32\OpenSSH-Win32/sshd_config len 256

debug3: C:\Users\Administrator\Downloads\OpenSSH-Win32\OpenSSH-Win32/sshd_config:50 setting AuthorizedKeysFile .ssh/authorized_keys

debug3: C:\Users\Administrator\Downloads\OpenSSH-Win32\OpenSSH-Win32/sshd_config:115 setting Subsystem sftp /usr/libexec/sftp-server

debug3: C:\Users\Administrator\Downloads\OpenSSH-Win32\OpenSSH-Win32/sshd_config:123 setting PubkeyAcceptedKeyTypes +ssh-dss,ecdsa-sha2-nistp256

debug1: sshd version OpenSSH_7.1, OpenSSL 1.0.2d 9 Jul 2015

[Build Nov  9 2015 22:18:33]

debug3: getpwnam: username [sshd]

debug3: getpwnam: system dir [C:\Windows\system32]

debug3: getpwnam: shell path [C:\Windows\system32\cmd.exe]

debug1: _open() returned error, errno [2]

debug1: key_load_private: No such file or directory

debug1: _open() returned error, errno [2]

debug1: key_load_public: No such file or directory

Could not load host key: ssh_host_rsa_key

debug1: _open() returned error, errno [2]

debug1: key_load_private: No such file or directory

debug1: _open() returned error, errno [2]

debug1: key_load_public: No such file or directory

Could not load host key: ssh_host_dsa_key

debug1: _open() returned error, errno [2]

debug1: key_load_private: No such file or directory

debug1: _open() returned error, errno [2]

debug1: key_load_public: No such file or directory

Could not load host key: ssh_host_ecdsa_key

debug1: _open() returned error, errno [2]

debug1: key_load_private: No such file or directory

debug1: _open() returned error, errno [2]

debug1: key_load_public: No such file or directory

Could not load host key: ssh_host_ed25519_key

Disabling protocol version 2. Could not load host key

sshd: no hostkeys available -- exiting.

--

You can see more details on the XML below.

Note:

  • I skipped the Firewall step since the firewall is not running.
  • It seems that I generated the keys successfully (I got no errors and I see two files in C:\Users\Administrator\.ssh folder: id_rsa and id_rsa.pub - see the output below)
  • There's no antivirus installed on this host
  • I tried to install both 32bit and 64bit packages (same error on both).
  • My machine is 64bit running on VMware.
  • I installed it as an administrator using "local system account"

These are the XML details from the Event Viewer:

Log Name:      System
Source:        Service Control Manager
Date:          12/25/2015 12:17:53 PM
Event ID:      7034
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      WINSXXX
Description:
The SSHD service terminated unexpectedly.  It has done this 2 time(s).
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />
    <EventID Qualifiers="49152">7034</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8080000000000000</Keywords>
    <TimeCreated SystemTime="2015-12-25T10:17:53.073482000Z" />
    <EventRecordID>20007</EventRecordID>
    <Correlation />
    <Execution ProcessID="468" ThreadID="4180" />
    <Channel>System</Channel>
    <Computer>WINSXXX</Computer>
    <Security />
  </System>
  <EventData>
    <Data Name="param1">SSHD</Data>
    <Data Name="param2">2</Data>
  </EventData>
</Event>

Output of generating keys:

C:\Users\Administrator>C:\Users\Administrator\Downloads\OpenSSH-Win32\OpenSSH-Win32\ssh-keygen.exe
Generating public/private rsa key pair.
Enter file in which to save the key (C:\Users\Administrator/.ssh/id_rsa):
C:\Users\Administrator/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in C:\Users\Administrator/.ssh/id_rsa.
Your public key has been saved in C:\Users\Administrator/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:POHEtRE0YZGfFqcxjkt8x9znhJsm+MvCuhFCUR9bYxg Administrator@WINSXXX
The key's randomart image is:
+---[RSA 2048]----+
|      ....EB+    |
|       o +oO+..  |
|      . +.++ X o |
|     . + .+ B = +|
|      . S. = . =.|
|       . oo . + .|
|        .. . o   |
|         .o..    |
|        oo .o.   |
+----[SHA256]-----+

C:\Users\Administrator>


I could finally resolve it.

The keys were not generated on the relevant folder.

If you follow these instructions, you have to change directory to relevant folder before applying step #3.