yanatan16
yanatan16

Reputation: 1469

Cygwin Openssh can't see /etc/sshd_config

I can't get the openssh server to work on Windows Server 2008. I have it working on two other servers, but one of them just won't work.

I run ssh-host-config, and choose privilege separation. Two users are created sshd and sshd_server.

Then I run net start sshd, and I see this:

The CYGWIN sshd service is starting.
The CYGWIN sshd service could not be started.

The service did not report an error.

Then I run cat /var/log/sshd.log and I see this output:

/etc/sshd_config: No such file or directory

I then check permissions on /etc/sshd_config:

-rw-r--r-- 1 sshd_server root 3344 Sep   7 09:15 /etc/sshd_config

So now, it seems sshd cannot see a file which is there and has the right permissions. Even on windows, that file is owned by sshd_server.

Upvotes: 3

Views: 4620

Answers (1)

Avi
Avi

Reputation: 165

had this happen too . a Procmon session revealed to me that the sshd service was trying to locate /etc in the root directory c:\etc instead of c:\cygwin\etc.

further investigation showed that sshd was loading an incorrect cygwin1.dll which was living in my system PATH environment variable.

solution was to either to remove the bad cygwin1.dll or remove the "bad" path from the system variables and assigning that path it to user specific environment variables.

afterwards running the sshd daemon under a dedicated user who did not have this "bad "path worked as it should.

thanks mark

Upvotes: 3

Related Questions