Project

General

Profile

Actions

tickets #162731

open

Duplicate MOTD

Added by crameleon 9 days ago. Updated 9 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
Core services and virtual infrastructure
Target version:
-
Start date:
2024-06-21
Due date:
% Done:

0%

Estimated time:

Description

On some machines, I get our disclaimer twice.

Just one example:

$ ssh -J thor1.infra.opensuse.org provo-proxy1.infra.opensuse.org
##########################################################
# This machine is part of the openSUSE infrastructure.   #
# Please be considerate and adhere to our policy:        #
# https://en.opensuse.org/openSUSE:Infrastructure_policy #
# Changes should be contributed to our Salt repository:  #
# https://gitlab.infra.opensuse.org/infra/salt           #
##########################################################

Have a lot of fun...
Last login: Fri Jun 21 19:09:26 2024 from 172.16.164.11
##########################################################
# This machine is part of the openSUSE infrastructure.   #
# Please be considerate and adhere to our policy:        #
# https://en.opensuse.org/openSUSE:Infrastructure_policy #
# Changes should be contributed to our Salt repository:  #
# https://gitlab.infra.opensuse.org/infra/salt           #
##########################################################

But the /etc/motd only contains it once (as correctly managed by Salt):

provo-proxy1 (proxy):~ # more /etc/motd
##########################################################
# This machine is part of the openSUSE infrastructure.   #
# Please be considerate and adhere to our policy:        #
# https://en.opensuse.org/openSUSE:Infrastructure_policy #
# Changes should be contributed to our Salt repository:  #
# https://gitlab.infra.opensuse.org/infra/salt           #
##########################################################

Have a lot of fun...

It's not duplicated in the SSH banner either:

provo-proxy1 (proxy):~ # more /etc/ssh/banner
Welcome to provo-proxy1.infra.opensuse.org!
Actions #1

Updated by crameleon 9 days ago

  • Private changed from Yes to No
Actions #2

Updated by crameleon 9 days ago

  • Description updated (diff)
Actions #3

Updated by crameleon 9 days ago

It seems to happen on the jump server directly as well, not just when jumping to a second host:

georg@bittersuse ~> ssh thor1.infra.opensuse.org
##########################################################
# This machine is part of the openSUSE infrastructure.   #
# Please be considerate and adhere to our policy:        #
# https://en.opensuse.org/openSUSE:Infrastructure_policy #
# Changes should be contributed to our Salt repository:  #
# https://gitlab.infra.opensuse.org/infra/salt           #
##########################################################

Have a lot of fun...
Last login: Fri Jun 21 20:27:18 2024 from 2a07:de40:b27e:5001:f797:9eb7:983:bc9f
##########################################################
# This machine is part of the openSUSE infrastructure.   #
# Please be considerate and adhere to our policy:        #
# https://en.opensuse.org/openSUSE:Infrastructure_policy #
# Changes should be contributed to our Salt repository:  #
# https://gitlab.infra.opensuse.org/infra/salt           #
##########################################################

Have a lot of fun...

Setting PrintMotd no in sshd_config seems to solve it:

georg@bittersuse ~> ssh thor1.infra.opensuse.org
##########################################################
# This machine is part of the openSUSE infrastructure.   #
# Please be considerate and adhere to our policy:        #
# https://en.opensuse.org/openSUSE:Infrastructure_policy #
# Changes should be contributed to our Salt repository:  #
# https://gitlab.infra.opensuse.org/infra/salt           #
##########################################################

Have a lot of fun...
Last login: Fri Jun 21 20:28:53 2024 from 2a07:de40:b27e:5001:f797:9eb7:983:bc9f
Actions #4

Updated by crameleon 9 days ago

Aha:

provo-proxy1 (proxy):~ # grep -r motd /etc/pam.d
/etc/pam.d/sshd:session     optional    pam_motd.so

So we have sshd and PAM printing the MOTD in our default setup.

I suppose keeping /etc/pam.d/sshd as is (shipped by the openssh-server package) and changing PrintMotd globally is the way to go.

Actions #5

Updated by crameleon 9 days ago

  • Status changed from New to In Progress
  • Assignee set to crameleon
Actions

Also available in: Atom PDF