≡ Menu

Ubuntu Linux: OpenSSH Change Welcome Login Message

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: 
Share this tutorial on:

Like this? Follow us on Twitter OR support us by using Patreon

{ 9 comments… add one }
  • thefixer December 14, 2010, 4:41 pm

    nope, doesnt work on Ubuntu 9

    • thefixer May 5, 2011, 2:36 pm

      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

      • thefixer May 5, 2011, 2:37 pm

        derp I meant


  • Charlie March 15, 2011, 3:24 am

    You will need to restart sshd….
    /etc/init.d/ssh restart

    • Charlie May 6, 2011, 10:33 pm

      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.

      • thefixer May 6, 2011, 11:20 pm

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

  • Connor December 14, 2011, 6:32 pm

    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 :)

  • Arul Dhanapani April 11, 2012, 4:47 am

    It’s Work.. Thanks

Security: Are you a robot or human?

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: , , ,