SSH expects a new line at the end of known_hosts file. Without a new line the next entry goes on the same line as the last entry in known_hosts causing errors.