小编Sam*_*pen的帖子

当我使用 SSH 登录到我的服务器时,会显示两个 MOTD

我想更改在 TTY 上登录计算机时显示的 MOTD,这似乎有效,但不知何故,它不仅在/etc/motd和 中显示 MOTD /etc/update-motd.d/,而且还显示另一条消息。

这在我登录到我的服务器时显示:

sam@laptop:~$ ssh <user>@<server>
Welcome to Ubuntu 12.04.2 LTS (GNU/Linux 2.6.32-042stab068.8 i686)

 * Documentation:  https://help.ubuntu.com/
No mail.
Last login: Thu Feb 21 19:20:55 2013 from <ip>
Welcome to Ubuntu 12.04.2 LTS (GNU/Linux 2.6.32-042stab068.8 i686)

 * Documentation:  https://help.ubuntu.com/

<user>@<server>:~$
Run Code Online (Sandbox Code Playgroud)

我的update-motd.d包含两个文件,00-header10-help-text.

00-header 包含以下内容:

[ -r /etc/lsb-release ] && . /etc/lsb-release

if [ -z "$DISTRIB_DESCRIPTION" ] && [ -x /usr/bin/lsb_release ]; then
        # Fall back to using …
Run Code Online (Sandbox Code Playgroud)

linux ubuntu motd

8
推荐指数
1
解决办法
1万
查看次数

标签 统计

linux ×1

motd ×1

ubuntu ×1