Can't setup SSH server on Cygwin

2

I had set this up a while ago on a different computer, but I can't get it running now. I've followed the directions at http://pigtail.net/LRP/printsrv/cygwin-sshd.html and I'm getting the following error.

Gulshan@GSJK-PC ~
$ cygrunsrv -S sshd
cygrunsrv: Error starting a service: StartService:  Win32 error 1069:
The service did not start due to a logon failure.

I don't know where to start troubleshooting this error... I've ran Cygwin with admin privileges every time I installed it and when I run the cygrunsrv or net start commands.

net start sshd doesn't work either.

gsingh2011

Posted 2011-10-01T18:52:27.160

Reputation: 863

What version of windows are you running now and what version of windows where you running when it worked? – Nifle – 2011-10-02T09:54:37.313

@Nifle Windows 7 now, and I believe XP worked. – gsingh2011 – 2011-10-03T02:47:03.563

I have no real insight but have you tried starting the cygwin shell as administrator? – Nifle – 2011-10-03T10:55:22.480

@Yes, that was included in the question. – gsingh2011 – 2011-10-04T02:50:02.263

No, you said that you ran as administrator when you installed it. – Nifle – 2011-10-04T07:57:41.563

Answers

1

Try the ssh-host-config command in a Cygwin shell. That sets up the privsep user, and the host keys, etc. I just set Cygwin ssh up on Windows 2008 R2, and once I did this, it worked for me.

Tim Kennedy

Posted 2011-10-01T18:52:27.160

Reputation: 355

Yea, I did that. It gave me a couple warnings, but they seem to be common warnings. No luck. – gsingh2011 – 2011-10-06T01:28:28.720

Did you start the server by typing net start sshd? If that fails, check the server log in /var/log/sshd.log. I've found helpful error messages in there. – Fran – 2012-05-16T17:51:59.447