sshd crahes; ssh instal fails

Brian Dessent
Mon Dec 5 12:36:00 GMT 2005 wrote:

> I installed sshd using sshd-host-config. I did no give any options to the script.
> when it ran it asked about a creating an unprivileged sshd. I tried both the options creating unprivileged sshd and without creating one.

Nothing in your cygcheck output seems out of the oridinary.

Normally the reason for the malfunction is listed in the Event Log,
which you need to check.  There is a chance there is also information in
/var/log/sshd.log but this will only be the case if cygrunsrv itself
encounters an error (rather than sshd.)

In my experience almost all cases of sshd not starting are due to wrong
or incorrect permissions on some files.  ssh-host-config ought to take
care of this for you.  It could also be a software firewall that isn't
allowing the process to bind to port 22.

If you cannot figure out from the above what the problem is, I suggest
you remove all traces of the sshd service and re-run ssh-host-config. 
To do this:

$ cygrunsrv --remove sshd
$ rm -rf /etc/{ssh_host_*,sshd_config} /var/{empty,run/sshd*,log/sshd*}
$ ssh-host-config

If you get any permission denied errors at the rm step you'll need to
chown the files before deleting them.


Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list