Probably it is of no use in your case, but there is an option called
-o RequestTTY.
I am not sure if the ssh
-t option could solve your issue
Code:
-t Force pseudo-tty allocation. This can be used to execute
arbitrary screen-based programs on a remote machine, which can be
very useful, e.g. when implementing menu services. Multiple -t
options force tty allocation, even if ssh has no local tty.
Or maybe in combination with some dangerous
sudo magic
A similar issue can be found at
http://stackoverflow.com/questions/6...-expect-object