Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

How can I disable/modify the SSH login banner for a given user?

enter image description here

share|improve this question
I think it is located at /etc/motd. Try editing that file and see –  sagarchalise Mar 31 '11 at 9:33
I did edit it but the changes are always overwritten by this default message. –  Olivier Lalonde Mar 31 '11 at 9:36… says there is /etc/motd.tail file you should edit for ubuntu server. –  sagarchalise Mar 31 '11 at 9:40

4 Answers 4

up vote 17 down vote accepted

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.

touch ~/.hushlogin
share|improve this answer

In /etc/ssh/sshd_config

PrintMotd yes

Set 'yes' to 'no' and restart the SSH server by typing

service ssh restart

You should be good to go from there.

share|improve this answer
+1 Your solution is great because it keeps Last login but hides the rest. –  Brian Graham May 30 '14 at 19:31
Doesn't seem to work. At least not in 14.04. Mine was already set "no" and yet the welcome greeting was still showing. What helped was updating /etc/pam.d/sshd. –  cherio Jun 5 at 15:24
@cherio , I can confirm that the same worked for me. Using LTS 14.04 –  Ace Jun 8 at 19:30

If you want to disable that message for all ssh users, edit /etc/pam.d/sshd and comment out the lines

session    optional  motd=/run/motd.dynamic noupdate
session    optional # [1]
share|improve this answer
Works on ubuntu 14.04 –  max Oct 1 at 15:05

.hushlogin didn't do the trick for me (on Debian 7), but setting Banner to /dev/null in /etc/ssh/sshd_config :

#Banner /etc/
Banner /dev/null
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.