-   Debian (
-   -   ssh banner and motd (

binary_dreamer 03-21-2013 01:03 PM

ssh banner and motd
hi.i am trying to setup the ssh banner when i login to my system debian 6.0.7.
i have altered the /etc/motd to my message, but it works until i reboot the system. after that it comes to the original. i have added a custom message to ssh-banner and add it to /etc/ssh/sshd_config.
now when i ssh to the system i get the ssh-banner and the original message from motd.
how to i get rid of the motd forever or make changes permanent to motd?

netnix99 03-21-2013 01:14 PM

There's more than one way to skin a cat... but you can (as root)

cat /dev/null > /etc/motd
to blank out the motd. I personally put my banner message in /etc/issue (you could use any file), and then in /etc/ssh/sshd_config, find the line

# Banner none
and change it to

Banner /etc/issue

binary_dreamer 03-22-2013 04:06 AM

this is what i have done to erase everything from /etc/motd.
after a reboot thought it comes back the default motd

Last login: Fri Mar 22 11:01:35 EET 2013 on ttyS0
Linux debPBX 2.6.32-5-486 #1 Mon Feb 25 00:22:26 UTC 2013 i586

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.

this is that i want to erase permanently.

netnix99 03-22-2013 09:39 AM

...see if you have a sym link from /etc/motd to /var /run/motd

if not, see if /var/run/motd exists, and change it - reboot, and see if your problem disappears...

Let me know! :)

liefde 04-14-2013 06:03 PM

Your ssh banner before login is set in /etc/ssh/sshd_config , so in sshd_config you can set it to say

Banner none
Furthermore, after succesful login, the ssh linux splash you see is usually configured via /etc/pam.d/sshd and/or /etc/pam.d/login
In those two files, look for the line that says

session optional
and comment it out:

# session optional
then of course save, close, reload.

If you ask me, those banners are a complete waste of valuable screen-space (and time). First thing I kick out with a new openssh installation.

All times are GMT -5. The time now is 07:59 AM.