How to change banner / welcome message, ssh server shows at login time.Follow @ggarron
Opensshd has a nice feature, that lets you present a welcome message to users who are login in to the Linux server. This feature is useful if you need to present a warning or any other message to users before they log into the system.
A good example could be something like this message:
“Please be responsible while you are logged into this server, any bad action will be recorded, and legal actions will taken”
How to enable sshd banner
First you need to create the Banner that will be displayed by ssh server. So create a file that will have that banner.
You may use any other text editor, I like vim.
There you can add the message, let’s follow the example above:
Please be responsible while you are logged into this server, any bad action will be recorded, and legal actions will taken
Now configure sshd to show your banner to users trying to log into the server.
Edit the file
Look for this line, or create if none exists.
Of course you can point Banner to any other file, where you have the message to want to be displayed.
Now, restart Opensshd
For Slackware users.
For Arch Linux users.
For Debian/Ubuntu users.
Test sshd banner
Log into your own computer you can do it from the same server.
You should see something like this:
bash-4.1$ ssh localhost Please be responsible while you are logged into this server, any bad action will be recorded, and legal actions will taken ggarron@localhost's password:
You are done.