I have a log file on remote server, and I need to
tail -f it on local machine via
ssh. The command is pretty trivial:
ssh -n email@example.com 'tail -f /path/to/remote/file'
Initially it works just great, but after some time (probably 1-3 hours) it stops working: there are new lines in the remote log file, but it isn't updated here, on local machine. No error is echoed, it just stops working. I have to interrupt it by pressing Ctrl+C and restart the same command, and it starts working again, for some time.
Internet connection is 100% working, because at the same time I have interactive SSH session to the same remote server, and it keeps working always.
What could be the problem, how to solve it?
Just in case, I'd say what I'm trying to achieve: it's just about remote irssi notifications. I have a server on which irssi is always running in tmux session, and I want to receive notifications on my desktop. So that important events (start_notification/stop_notification) are written to the log file, and my local script reads this log and manages notifications (tray icon, sound, libnotify's event)
And, as I already said, it stops working after some time, until I restart it.
My desktop OS is Linux Mint 13 MATE, server OS is Debian 3.2.51-1
Any help appreciated.