I know that in Windows when I need something like Plink utility, Putty that via SSH runs commands on a remote server bringing the remote control for Windows.
Something like this, for example:
plink DEBIAN_SSH cat /var/log/messages
Plink is an SSH utility so it does nothing more than run a command on the remote server and brings its output back, all using SSH.
So if the local server is also Linux, you can use direct SSH:
ssh [USER-NAME]@[REMOTE-HOST] cat /var/log/messages
-
Obviously this command can only be executed as ROOT or if the user that logs has permission in VISUDO for example.
-
It is also worth mentioning that you need to have an access key on the local server that allows remote connection without requiring a password on the remote server, otherwise the command will require a password. See this link if you need create a pair of keys for access.
But I believe that is the way.
If you want to monitor the real-time log output, the correct command is:
tail -f /var/log/messages
References in the links and also in the link below. link