1833183 Members
2893 Online
110051 Solutions
New Discussion

ssh and /etc/motd

 
Ing Meloni
Advisor

ssh and /etc/motd

When users connect to my HP servers (V2500 and N4000 running 11.0) through ssh the file /etc/motd is displayed twice. This is quite annoying, since the file is long.
This happens both with OpenSSH and SSH (last versions). I tested with Tru64 and Solaris, but it seems a problem of HPUX only.
Changing in sshd_config PrintMotd yes to no
has no effect.

Some hints?
6 REPLIES 6
Clemens van Everdingen
Honored Contributor

Re: ssh and /etc/motd

Hi,

See this thread:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1f697d4cf554d611abdb0090277a778c,00.html

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Ing Meloni
Advisor

Re: ssh and /etc/motd

Sorry, in that thread the suggested solution was putting in sshd_config PrintMotd no.
I already tried it. It doesn't work.
S.K. Chan
Honored Contributor

Re: ssh and /etc/motd

Did you restart "sshd" after the change is made ?
Ing Meloni
Advisor

Re: ssh and /etc/motd

Of course.
Mark Greene_1
Honored Contributor

Re: ssh and /etc/motd

this is a bit of a reach, but do you have the inetd.conf file setup so that telnetd has the -b option using motd as well? have you check /etc/profile to see if it is in there, and how many times?

HTH
mark
the future will be a lot like now, only later
bryanh_1
Occasional Advisor

Re: ssh and /etc/motd


The problem occurs because ssh displays motd, and then login displays motd. You need to re-compile ssh to correct the problem. Make the following change to the sources before compiling ...

ex servconf.c <%s/options->print_motd = -1;/options->print_motd = 0;/
w
q
EOT

Note that the substitute (s/) s.b. one line.