记得我首次使用腾讯云服务器的时候,在每次ssh连接的时候都会有一段描述系统当前状态的消息。就像:
Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-53-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Sat Mar 11 16:04:01 CST 2017
System load: 0.35 Processes: 138
Usage of /: 19.2% of 19.56GB Users logged in: 1
Memory usage: 66% IP address for eth0: 10.135.38.108
Swap usage: 0% IP address for docker0: 172.17.0.1
Graph this data and manage this system at:
https://landscape.canonical.com/
Last login: Sat Mar 11 15:49:53 2017 from xxx.x.xx.xxx
感觉很不错,可是后来我换了一个版本的Ubuntu,就没有这个了,我挺想念它的,于是今天就研究了一下。原来,在Ubuntu中,这个登录信息是由update-motd框架根据脚本动态生成的,其脚本位于/etc/update-motd.d/
详见man update-motd
。
而这个提供系统信息的脚本又是来自landscape-common
包的,于是呢,我只要安装这个包,我的系统信息就又回来啦!
引用:system info on ssh login - one does, one does not - Ubuntu Forums