Linux Logging – How to Tail Multiple Remote Files

consolelinuxloggingtail

Is there a way to remote tail 2 files?

I have two servers(a and b) behind a load balancer and I would like to do something like this if possible:

tail -f admin@serverA:~/mylogs/log admin@serverB:~/mylogs/log

Thanks!

Best Answer

This worked for me:

ssh -n user@hostname1 'tail -f /mylogs/log' &
ssh -n user@hostname2 'tail -f /mylogs/log' &
Related Topic