(related to this question)
When using sshd server (Win32-OpenSSH) on windows (with key-based auth for automation), it doesn't work unless it has STDIN (or PTY). For example, running this (from Debian Jessie openssh client) works OK (returning windows username):
ssh -4 -T -o Batchmode=yes winserver whoami
However, those two do not (they simply terminated without executing command and without returning any output):
ssh -4 -T -o Batchmode=yes winserver whoami < /dev/null ssh -4 -n -T -o Batchmode=yes winserver whoami
This presents problem as it is impossible to run non-interactive ssh commands from programs which do not have open STDIN (like cron(8) or atd(8)).
When using Debian openssh server, it of course works without any problems. Problem only happens with windows ssh servers (Fails with Win32-OpenSSH and FreeSSHD. Bitvise SSHD however seems to work OK, but we're looking at gratis solutions for windows ssh servers; open source, simple and maintained are bonuses)
This has been reported, but does anybody have solution or workaround in the meantime?