Ubuntu 14.04 不显示登录信息-motd

Ubuntu 14.04 不显示登录信息-motd

我在数据中心内和虚拟机上分别安装了一台 ubuntu 14.04.03 服务器。不幸的是,数据中心的服务器仅在登录后显示此信息:

ssh fx1
Welcome to Ubuntu 14.04.3 LTS (GNU/Linux 3.19.0-26-generic x86_64)

 * Documentation:  https://help.ubuntu.com/
No mail.
Last login: Wed Nov 18 09:07:08 2015 from 127.red-83-52-183.dynamicip.rima-tde.net  

而另一个则在登录时提供更多有用的信息:

ssh node1
Welcome to Ubuntu 14.04.3 LTS (GNU/Linux 3.19.0-30-generic x86_64)

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

  System information as of Tue Nov 17 17:22:48 CET 2015

  System load:  0.15              Users logged in:     0
  Usage of /:   78.7% of 8.59GB   IP address for eth0: 192.168.56.120
  Memory usage: 5%                IP address for eth1: 10.0.0.120
  Swap usage:   0%                IP address for eth2: 192.168.1.178
  Processes:    174               IP address for tun0: 10.7.0.1

  => /data/mysql is using 85.1% of 14.64GB

  Graph this data and manage this system at:
    https://landscape.canonical.com/

32 packages can be updated.
17 updates are security updates.

Last login: Tue Nov 17 17:22:48 2015 from 192.168.56.1

我该如何改变这一点?/etc/ssh/sshd_config看起来差不多。

答案1

看一下手册页sshd_config(5)。有一个选项PrintMotd,可以sshd打印当天的消息。

但请确保 MOTD 在正确的路径上可用/etc/motd,如果您希望它动态化,则正确更新,并且在更改后重新启动 ssh 服务。

相关内容