Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
wsseo
V2EX  ›  Linux

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

  •  
  •   wsseo · Oct 6, 2025 · 2309 views
    This topic created in 227 days ago, the information mentioned may be changed or developed.
    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 元素要刷新,非要把整个页面都刷新。在其他系统中也没见过这种搞法。

    2 replies    2025-10-09 14:53:54 +08:00
    w568w
        1
    w568w  
       Oct 8, 2025   ❤️ 1
    看起来是在这里写入的: 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
        2
    raodao  
       Oct 9, 2025
    @w568w 无语
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4268 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 10:09 · PVG 18:09 · LAX 03:09 · JFK 06:09
    ♥ Do have faith in what you're doing.