I call the cmd file, which calls ssh to interact with the Linux machine. I use the .NET Process class for this. But when called in the Windows Service, the call fails:
C:\test>ssh -o StrictHostKeyChecking=no -i private_linux_key user@host "ls" 0 [main] ssh 9496 fhandler_base::dup: dup(some disk file) failed, handle 0, Win32 error 6 dup() in/out/err failed
Everything works when I run the application as a console application.
What is the possible reason for this failure and how to fix it?
EDIT All Windows services should do - somehow kill a predefined daemon on a Linux machine
thanks
EDIT
A similar problem is described there: http://www.velocityreviews.com/forums/t714254-executing-commands-from-windows-service.html
Roman source share