Friday, April 17, 2015

run cygwin sshd under SYSTEM user - The CYGWIN sshd service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs

I got this error when trying to switch cygwin sshd to run as windows SYSTEM user. This is a need if you want to allow cygwin to interact with graphical applications.
The CYGWIN sshd service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs
The first thing to do is to look into the sshd logs:
$ tail -10 /var/log/sshd.log
/var/empty must be owned by root and not group or world-writable.
The reason for this error is the fact that SYSTEM user (look upper case) is not the owner of /var/empty. The exact reason why this error happens is explained here. So the solution is simple:
$ chown SYSTEM /var/empty
Even though I went pass this issue I later realized there was no way to run desktop applications remotely using this method as explained here and here.

No comments:

Followers