ssh login message
ssh login message can be entertaining, informative and useful. The standard ssh login message is kind of boring, at least for Debian. This is the default Debian message
“Linux eve 3.2.0-4-amd64 #1 SMP Debian 3.2.78-1 x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.”
Pretty boring stuff.
For one of my servers at home, skynet.home I got this message message now
_ _ _ | | | | | | ___| | ___ _ _ __ ___| |_ | |__ ___ _ __ ___ ___ / __| |/ / | | | '_ \ / _ \ __| | '_ \ / _ \| '_ ` _ \ / _ \ \__ \ <| |_| | | | | __/ |_ _| | | | (_) | | | | | | __/ |___/_|\_\\__, |_| |_|\___|\__(_)_| |_|\___/|_| |_| |_|\___| __/ | |___/ _ ___ | | | ||__ \ __ _ ___ | |_ _ __ ___ ___ | |_ ) | / _` |/ _ \| __| | '__/ _ \ / _ \| __|/ / | (_| | (_) | |_ | | | (_) | (_) | |_|_| \__, |\___/ \__| |_| \___/ \___/ \__(_) __/ | |___/
You have new mail.
Last login: Tue May 31 00:32:02 2016 from ronnys-air.home
How can you change your ssh login message?
The ssh login message is located in /etc/motd
You can change this file to display whatever you want.
If you need a nice ascii text art generator, have a look at this http://patorjk.com/software/taag
There are many other ascii art generator tools out there. Just google for them.
The last login message will still appear below the stuff you enter into /etc/motd. I will recommend you leave that on, so you can keep an eye on last logins. It might save you. However if you absolutely need to remove it. Go to /etc/ssh/sshd_config
And look for this line PrintLastLog yes
Then change it from yes to no. And it will not display your last login anymore.
Please not that any changes to the sshd_config file require a restart of the ssh service before taking effect. Or you could just reboot the server.
This will work at least for all Debian based Linux system. I have never tested this with CentOS or any other Linux System.
Thats how to change ssh banners or login messages.