Nov 29, 2017

Customize Linux Logon

One of the easiest way to protect and secure SSH logins by displaying warming message to UN-authorized users or display welcome or informational messages to authorized users.
A legal banner contains some security warning information or general information, that alerts the user. It can be used for security, legal info, company policy, etc.
The /etc/issue file is a plain text file which will also accept certain escape sequences (see below) in order to insert information about the system. There is also the file issue.net which can be used when logging on remotely.
To display Welcome or Warning message for SSH users before login. Use issue.net file to display a banner massages. Open the following file with the editor.
vi /etc/issue.net
Add the banner message of your choice, and save the file. Next you would open the master ssh configuration file and enable banners.
vi /etc/ssh/sshd_config
Search for the word “Banner” and uncomment out the line and save the file.
#Banner /some/path
It should be like this.
Banner /etc/issue.net (you can use any path you want)
Next, restart the SSH daemon to reflect new changes.
/etc/init.d/sshd restart
Now try to connect to server you will see banner message you just added.