feature request
Salvador Fandino
sfandino at yahoo.com
Wed Feb 16 21:19:39 EST 2011
On 02/07/2011 10:56 PM, Cyrille Lefevre wrote:
>
> Hi,
>
> how about to provide a simple way to forward raw file descriptors
> through ssh tunnels.
>
> something which may provide a way to write something like :
>
> (echo 3; read > out3) |&
> exec 3<&p 4>&p
> echo 5 >| out5
> exec 5<> out5
> echo 1 |
> ssh -d 3:rd -d 4:wr -d 5:rw '
> read <&3; echo $REPLY >&4
> read; echo $REPLY
> read <&5; echo $REPLY >&5
> ' > out1
>
> the expected result is 1 in out1, 3 in out3 and 5\n5 in out5.
>
> PS : hope the sample is right :-)
>
> Regards,
>
> Cyrille Lefevre
Being able to forward extra streams could also be used to forward
/dev/pty decoupled from stdin and stdout.
For instance, with the current implementation, if the following command...
$ ssh foo -t ssh bar cat /var/data >/tmp/data
... is run from some account requiring password authentication on "bar"
the password prompt generated by the ssh client running on "foo" doesn't
appear on the local console but goes into "/tmp/data".
Also, on some operating systems (i.e. HP-UX or AIX) ptys are not
reliable and may silently drop data when internal buffers overflow so
piping data trough them as in the example above may corrupt the local
"/tmp/data".
A decoupled forwarding of /dev/pty would solve both problems.
- Salva
More information about the openssh-unix-dev
mailing list