LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 03-21-2013, 01:03 PM   #1
binary_dreamer
Member
 
Registered: Feb 2006
Distribution: debian squeeze
Posts: 185

Rep: Reputation: 31
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?
 
Old 03-21-2013, 01:14 PM   #2
netnix99
Member
 
Registered: Jun 2011
Distribution: redhat, CentOS, OpenBSD
Posts: 252

Rep: Reputation: 89
There's more than one way to skin a cat... but you can (as root)
Code:
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
Code:
# Banner none
and change it to
Code:
Banner /etc/issue
 
1 members found this post helpful.
Old 03-22-2013, 04:06 AM   #3
binary_dreamer
Member
 
Registered: Feb 2006
Distribution: debian squeeze
Posts: 185

Original Poster
Rep: Reputation: 31
this is what i have done to erase everything from /etc/motd.
after a reboot thought it comes back the default motd

Password:
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.
 
Old 03-22-2013, 09:39 AM   #4
netnix99
Member
 
Registered: Jun 2011
Distribution: redhat, CentOS, OpenBSD
Posts: 252

Rep: Reputation: 89
...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!
 
Old 04-14-2013, 06:03 PM   #5
liefde
LQ Newbie
 
Registered: Apr 2013
Posts: 2

Rep: Reputation: Disabled
Your ssh banner before login is set in /etc/ssh/sshd_config , so in sshd_config you can set it to say
Code:
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
Code:
session optional pam_motd.so
and comment it out:
Code:
# session optional pam_motd.so
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hide ssh banner shafey Linux - Security 3 04-14-2013 05:59 PM
motd or login banner per user maginotjr Linux - Server 9 03-09-2012 01:08 PM
[SOLVED] Script to generate SSH Banner MOTD geforce Programming 6 04-18-2010 04:26 PM
how to avoid motd banner after successfull ftp login sebasyan Linux - Server 2 11-19-2009 11:08 PM
SSH banner design garnser Linux - Software 1 10-16-2004 02:07 AM


All times are GMT -5. The time now is 11:13 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration