The following line shows the principle of a construct which I can use under Red hat 5.5:
$ echo "foo" | ssh myhost "echo \"cat <&1\" | su --login" foo
Actually it was never clear to me why cat can read from FD #1, but it works.
Now with Red Hat 6.3 that doesn't work anymore:
$ echo "foo" | ssh myhost "echo \"cat <&1\" | su --login" cat: -: Bad file descriptor
First question: Why does this not work anymore? Second question: Does anybody has an idea for a solution that works under Red Hat 6.3?
All ideas are appreciated.