Ubuntu Linux: OpenSSH Change Welcome Login Message

by on November 12, 2009 · 9 comments· LAST UPDATED November 12, 2010


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: 
Tweet itFacebook itG+ itDownload PDF versionFound an error/typo on this page?

{ 9 comments… read them below or add one }

1 thefixer December 14, 2010 at 4:41 pm

nope, doesnt work on Ubuntu 9


2 thefixer May 5, 2011 at 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


3 thefixer May 5, 2011 at 2:37 pm

derp I meant



4 Charlie March 15, 2011 at 3:24 am

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


5 Charlie May 6, 2011 at 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.


6 thefixer May 6, 2011 at 11:20 pm

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


7 thefixer May 6, 2011 at 11:22 pm

send me an email at thefixer@electroniktribulationarmy.com, send me your urI gotta see this to believe it.


8 Connor December 14, 2011 at 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 :)


9 Arul Dhanapani April 11, 2012 at 4:47 am

It’s Work.. Thanks


Leave a Comment

Tagged as: , , ,

Previous Faq:

Next Faq: