openeuler 这个警告提示为什么要打印两遍?

2025 年 10 月 6 日
 wsseo
Authorized users only. All activities may be monitored and reported.

Authorized users only. All activities may be monitored and reported.
Activate the web console with: systemctl enable --now cockpit.socket

Last login: Tue Feb 18 22:59:31 2025 from 192.168.130.102


Welcome to 6.6.0-76.0.0.80.oe2403sp1.x86_64

通过 SSH 登陆,Authorized users only 这个提示打两便,强迫症受不了。

查了下,一个是/etc/issue ,一个是/etc/issue.net,或者是这个/etc/motd

无论如何都不美观,就像一个 web 元素要刷新,非要把整个页面都刷新。在其他系统中也没见过这种搞法。

2532 次点击
所在节点    Linux
2 条回复
w568w
2025 年 10 月 8 日
看起来是在这里写入的: https://gitee.com/openeuler/security-tool/blob/master/security.conf#L113-123

理论上来说,/etc/motd 是被 login(1) 打印的,/etc/issue 是被 getty 打印的,/etc/issue.net 是被 telnetd(8) 打印的。初看是冗余设计,但实际上面向是三个不同场景:

- /etc/motd:显示在登录后需要提示的今日消息( message of the day ),由管理员设定,相当于管理员的公告;
- /etc/issue:从 getty 登录(例如实体机上)时显示的信息,用于识别机器的身份;
- /etc/issue.net:从 telent 登录时显示的信息,也用于识别机器的身份。

而要在 SSH 登录时显示的信息,则在 /etc/sshd_config 的 Banner 项中设置。

之所以会打印两遍,是因为上面的配置还写了 `Banner /etc/issue.net`。所以你看到的分别是 /etc/motd 和 /etc/issue.net

至于为什么这么配置?安全的事你少管(狗头)……
raodao
2025 年 10 月 9 日
@w568w 无语

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://v2ex.ih06.com/t/1163553

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX