I'm trying to setup cygwin sshd to call a script via the AuthorizedKeysCommand. I can see the error messsage in the Windows EventViewer stating that:
sshd: PID 5178: error: Unsafe AuthorizedKeysCommand "/tmp/myscript": bad ownership or modes for file /tmp/myscript
The Cygwin SSHD service runs as the SYSTEM account. I've tried several options, including setting the ownership of the file to SYSTEM:SYSTEM (via chown), placing the file in /home/SYSTEM. The file is only writable by the owner and execution is granted to everyone, which seems to be compatible with that sshd expects.
Any thoughts?
Cygin version: 3.1.7(0.340/5/3) OpenSSH: 8.4p1 Windows 10 Enterprise