Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to display a message before any login on a Linux box, either locally and for remote login via SSH.

How can I achieve this?


Thanks for your answers. I had to pick one accepted answer, but both are correct and complement each other.

"issue" and "Banner" are the two concepts I need to use to provide a message for every user before they log into the system.

share|improve this question
up vote 9 down vote accepted

For local login (or telnet) you need to modify:


For display a message before login you edit instead



share|improve this answer
+1 (motd being the abbreviation of "message of the day"). – Alain Pannetier May 30 '11 at 0:16
is the motd displayed before the user is asked for a password ? – ascobol Jun 2 '11 at 11:18
The contents of /etc/motd are displayed by login(1) after a successful login but just before it executes the login shell. – DrNoone Jun 2 '11 at 19:45

For SSH, you need to change the Banner config option in sshd_config:

share|improve this answer
sure, but that will only display a message after a login name was given through ssh-connection. Any ideas displaying a banner / message before 'login: ' ? – Master of Celebration Aug 1 '13 at 9:31

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.