Controlling remote application by ssh

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I'm trying to use openssh to control remote apllication. I'm starting
openssh from my
program and taking over stdin/stdout to send commands and check results.
The problem is that remote application requires pseudo-tty.
If I connect from shell by
ssh -t user@host command
It works.
If I will do
ssh -T user@host command
the application crashes.
But if I issue
ssh -t user@host command
from within my program, I get the message:
Pseudo-terminal will not be allocated because stdin is not a terminal.
and application crashes.
If I issue
ssh -tt user@host command
I'm getting message:
tcgetattr: No such device
and command isn't started at all.

How to find workaround for this ?


Site Timeline