V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
wsseo
V2EX  ›  Linux

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

  •  
  •   wsseo · 2 天前 · 932 次点击
    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 元素要刷新,非要把整个页面都刷新。在其他系统中也没见过这种搞法。

    1 条回复    2025-10-08 19:22:11 +08:00
    w568w
        1
    w568w  
       8 小时 19 分钟前
    看起来是在这里写入的: 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

    至于为什么这么配置?安全的事你少管(狗头)……
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   699 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 19:41 · PVG 03:41 · LAX 12:41 · JFK 15:41
    ♥ Do have faith in what you're doing.