Differences

This shows you the differences between two versions of the page.

Link to this comparison view

guides:how-to-supress-kernel-messages-in-ssh [2016-08-24 18:57:46] (current)
rory.blanchard created
Line 1: Line 1:
 +====== How to Suppress Kernel Messages in SSH ======
  
 +If you have a firewall program or another program that regularly logs to the syslog, while in SSH or the console, you may be bombarded with messages that flood the console.
 +
 +You may see messages like this:
 +
 +<code>
 +DROP:IN=br0 OUT= MAC=xxx SRC=xxx DST=xxx LEN=60 TOS=0x00 PREC=0x00 TTL=128 ID=15731 DF PROTO=TCP SPT=63767 DPT=3493 WINDOW=8192 RES=0x00 SYN URGP=0
 +</code>
 +
 +You can suppress these messages by the running the following command:
 +
 +<code>
 +sysctl -w kernel.printk="3 4 1 3"
 +</code>
 +
 +What this controls is the behavior of logging for error messages. The command stops low-level messages from outputting to the console, but still logs them to the error log for the current boot.
 +
 +On reboot, the settings will revert back to normal. If you want to make this permanent, you can change or add the following line in **/etc/sysctl.conf**
 +
 +<code>
 +kernel.printk = 3 4 1 3
 +</code>
 +
 +<note tip>
 +You can check your current printk value at any time by running **sysctl kernel.printk**
 +</note>
 +\\
 +\\