Ubuntu Linux: OpenSSH Change Welcome Login Message

last updated in Categories

How do I change Openssh welcome login message under Ubuntu Linux?

First create a text file called /etc/ssh/welcome.msg using a text editor such as vi:
$ sudo vi /etc/ssh/welcome.msg
Append your welcome message:


Welcome to nixCraft Labs.

Save and close the file.
Next, edit /etc/sshd/sshd_config, enter:
$ sudo vi /etc/sshd/sshd_config
Add / edit as follows:
Banner /etc/ssh/welcome.msg
Save and close the file. Reload, ssh server:
$ sudo service ssh reload
Test your new settings:
$ ssh localhost
$ ssh user@server1.nixcraft.com

Sample outputs:

Welcome to nixCraft Labs!

vivek@localhost's password: 


Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

9 comment

    1. Actually, I must be an idiot, coz I just found this article again did the same thing and it works fine, only caveat in Ubuntu 9 is that

      its not /etc/sshd/sshd_config

      it is actually /etc/ssh/ssd_config

    1. I did and it didn’t help my situation.
      I use /etc/issue.net as my banner.
      The Welcome message works.
      My problem is that PAMD also does it’s thing.
      Like.. reports on the system’s status, if there are updates pending, and if a reboot is recommended to reload the updated Kernel.
      Then there is the last login line.
      So far I have three sources from which come the log-on display.

      1. So your saying that PAMD is dumping the system status on the PreLogin message instead of after the login??

  1. Thanks for this, works a charm for me. You might want to update the file location to /etc/ssh/sshd_config as its in the comments but not in the post.

    Helped a lot though :)

    Still, have a question? Get help on our forum!