Here is a very easy tip on how to add a welcome message for your SSH users


If you want that when users connect to your SSH server, they see a banner welcome message after connecting. Then you need to turn on the banner configuration of SSHd in its config file and then create a banner file.

Step 1:
Create a banner file that contains text you want people to see when connecting to your SSH server.
Create and open the banner file:
[root@amit]# vim /home/username/banner
put your message inside it

*****************************************************************
*This is a private SSH Server. You are not supposed to be here. *
*Your information has
been logged and a report has been emailed *
*to the admin
concerning your unauthorized attempts. *
*****************************************************************

then save & quit by using :wq!

Step 2:
Edit /etc/ssh/sshd_config to set a default banner path.
[root@amit]# vi /etc/ssh/sshd_config
then add the following to the config file:
Banner /path/to/banner
Save the file and quit: :wq
Step 3:
Restart the sshd server.
[root@amit] # /etc/init.d/sshd restart
Step 4:
Try SSH to your server and check Welcome banner on login


From the desk of Amit Maheshwari

 
Top
Maintained By Amit Maheshwari