How to prevent syslog message popping in a ssh session without affect other sessions?
/dev/console is not your current session, it is the server console (the screen you see when attaching a monitor).
What you see in your terminal are the emergency messages. I am not sure if you can restrict these messages per terminal, but you can restrict them to be sent only to specific users. A quick Google search revealed this link to be useful and it shows how to do it.
Related videos on Youtube
adamhj
Updated on September 18, 2022Comments
-
adamhj almost 2 years
i have a machine(RHEL 5.2) which receives syslog message from remote machines. And now it keeps popping message from remote machine in a ssh shell, which is annoying when i want to do something on it.
messages are like this:
Message from syslogd@ at Thu Jul 17 18:05:45 2014 ... xxx.xxx.xxx.xxx (a number seems representing time): blahblah
i found this line in /etc/syslog.conf file:
kern.* /dev/console
the problem is that i don't want to disable it, i only want to disable this temporarily for my current ssh session
i have tried 'dmesg -n1' but it does not works
-
adamhj almost 10 yearswell, after some search i found that it seems that there is no way to achieve my goal, nor can i separate remote log from local's. but still thanks for your information
-
Florin Asăvoaie almost 10 yearsTry "dmesg -n 0" and see if it does what you want...