Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
How can I disable/modify the SSH login banner for a given user?
It seems it is possible to disable this message on a user basis by creating an empty file in a user's $HOME directory (/home/username/) called .hushlogin.
If you want to disable that message for all ssh users, edit /etc/pam.d/sshd and comment out the lines
session optional pam_motd.so motd=/run/motd.dynamic noupdate
session optional pam_motd.so # 
In /etc/ssh/sshd_config make sure there is a line:
If it is set to 'yes' change it to 'no'.
Restart the SSH server by typing
service ssh restart
You should be good to go from there.
.hushlogin didn't do the trick for me (on Debian 7), but setting Banner to /dev/null in /etc/ssh/sshd_config :
It is also possible to disable banner using client-side only solution, that is by setting log level to error:
ssh -o LogLevel=Error <rest of cmd>
Found here: http://www.linuxquestions.org/questions/linux-security-4/how-do-you-turn-off-login-banner-for-non-interactive-ssh-470516/
Required, but never shown