This is definitely not a Linux question. I am familiar with cited application defect from having encountering it on the FreePBX distro.
This is an application issue created by developers that design on the flawed assumption that it is permissible to allow root ssh logins to production servers. Regardless of your position on that topic, which I will be the first to agree is a Linux question and need not be debated on a PBX forum, the reality is that disallowing root login over ssh is a well-established and widespread standard practice.
When an application fails to function correctly in such a standard server configuration, that is an absolutely an application design issue, not a Linux issue.
Since it is only a minor annoyance that reflects poorly on the developers, but doesn’t actually break anything, I just ignore the bad program design and the resulting error message. If you su (or sudo -i) after login, the badly designed MOTD call will function correctly, and display the welcome message the way the developers anticipated.
@pseverini Based on the responses you have received so far, it sounds like you can either fix it yourself and submit a pull request, or just ignore it like I do.