How can I disable/modify the SSH login banner for a given user?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
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
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 # 
/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
#Banner /etc/issue.net Banner /dev/null
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>