I'm trying to tail two log files in different hosts and use the merged output as a single one.
ssh HOST_1 "tail -f MY_LOG_FILE"
I'm also using mkfifo to create a named pipe.
The problem is. Outputting a local command to MY_PIPE works fine, but when I output my ssh command nothing can be read on the named pipe (tail -f MY_NAMED_PIPE in another terminal)
mkfifo MY_PIPE ssh HOST_1 "tail -f MY_LOG_FILE" > MY_NAMED_PIPE
The commands above generate no output on the pipe.
Is there any parameter to ssh command to pipe it correctly?
Is there another way to pipe it?