How to create a banner/welcome-note for SSH server

We can create banner/welcome-note for SSH server simply by adding a text file in ‘/etc/ssh/’ location which contails the content as welcome-note.
Do follow the steps below:
Step 1: Create the text file which has your welcome note under ‘/etc/ssh/’ location.

[[email protected] ~]# cd /etc/ssh/
[[email protected] ssh]# touch welcome.txt
[[email protected] ssh]# echo ":::Hai, Welcome to crybit's SSH:::" > welcome.txt 
[[email protected] ssh]# cat welcome.txt 
:::Hai, Welcome to crybit's SSH:::

Step 2: Add the Banner file details in your SSH configuration file:

ssh conf file : /etc/ssh/sshd_config
[[email protected] ~]# vim /etc/ssh/sshd_config
-----
#Banner none
Banner /etc/ssh/welcome.txt
-----

Step 3: Reatart the SSH daemon:

[[email protected] ~]# service sshd restart
Or
[[email protected] ~]# /etc/init.d/sshd restart

Try to ssh you will get the welcome note 🙂
Example:

[[email protected] ~]# ssh localhost
:::Hai, Welcome to crybit's SSH:::
[email protected]'s password:

That’s it..! 🙂 🙂

Related Links:
How to manage SSH permission for custom users under your server
How to disable SSH login as root user – PermitRootLogin
/etc/hosts.allow
/etc/hosts.deny

Post navigation

Arunlal Ashok

Operations Engineer at Endurance International Group. Linux lover. Like to play on Linux console. I started this blog to share and discuss Linux thoughts.

Always happy for an open discussion! Write to arun (@) crybit (dot) com. Check about me for more details. About this blog and our strong members, check The team CryBit.com
We like to travel. Our travelogues are published at Trip Mentor

4 thoughts on “How to create a banner/welcome-note for SSH server

Leave a Reply

Your email address will not be published. Required fields are marked *