I have a program that is spawning a process which executes a basic remote command over SSH such as:
ssh aiden@host /bin/ps
Running this manually from my shell is successful (as you would expect), but the parent program running the task always exits 127 ... even with absolute paths.
It isn't the local end returning 127 (it can find the ssh binary), but it is always the remote end even when equivalent commands from the shell, with absolute paths also, run fine.
Any ideas why my shell can execute this command, but my program can't? I realize this may be specific to my language (and therefore a question for StackOverflow), but my program passes its environment to SSH so I can't think what differs.