Score:0

Cygwin SSHD AuthorizedKeysCommand

ug flag

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

Ginnungagap avatar
gu flag
What does `ls -l "${scriptpath}"` say?
gsandorx avatar
ug flag
`-rwxr-xr-x 1 SYSTEM SYSTEM 452 Apr 12 11:21 /tmp/myscript*`. --- I also tried with root as owner
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.