views:

38

answers:

1

I have 2 machines A and B.

I wish to have the output from B printed in a terminal on A.

I run the following in a loop on A:

nc -l -p 65000

On B, all output is tee'd to /dev/tcp/A/65000

This works most of the time, but output from programs such as 'ls' lose their colour and tab formatting. Is there any way to get this to work, such as by writing directly to the tty on A? How would I do this?

Thanks.

+1  A: 

You need to use something like unbuffer to fool the program into thinking that it's connected to a tty.

Ignacio Vazquez-Abrams