How to Fix “missing newline or line too long” in a Linux Server

Question

How to remove the following errors when noticed in “/etc/hosts.allow” and “/etc/hosts.deny” files. 1) auth|security:err| error sshd[7275222]: warning: /etc/hosts.allow, line0: missing newline or line too long 2) auth|security:err| error sshd[7275222]: warning: /etc/hosts.deny, line0: missing newline or line too long

Sample error from a Red Hat 7.7 Server

Answer

To remove the errors do the following on the management node as root. Go to the last line, and hit “Enter”. This will add a new line to the file. Save the file and done.