我不知道到底发生了什么,但从几天前开始,每次我 ssh 进入我的服务器时都会出现这种情况
λ ssh doc@myserver
doc@myserver's password:
Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.4.0-33-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
* MicroK8s gets a native Windows installer and command-line integration.
https://ubuntu.com/blog/microk8s-installers-windows-and-macos
0 updates can be installed immediately.
0 of these updates are security updates.
Your Hardware Enablement Stack (HWE) is supported until April 2025.
Last login: Thu Jun 4 10:35:26 2020 from 1.2.3.4
Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.4.0-33-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
* MicroK8s gets a native Windows installer and command-line integration.
https://ubuntu.com/blog/microk8s-installers-windows-and-macos
0 updates can be installed immediately.
0 of these updates are security updates.
Your Hardware Enablement Stack (HWE) is supported until April 2025.
Last login: Thu Jun 4 10:35:26 2020 from 1.2.3.4
doc@myserver:~$
我该如何解决这个问题?(此外,我喜欢浏览软件包更新、安全更新和上次登录信息,但我不太关心 microk8s 新闻……)
谢谢你!
答案1
对于 ubuntu motd,你可以在
/etc/default/motd 新闻
只需将 ENABLED=1 从 1 改为 0
通过做
grep -ERi "motd" /etc
我们可以看到Linux已经变得多么混乱了!
在 /etc/ssh/sshd_config 中有一个“PrintMotd no”选项,但即使将其设置为 no,也确实会显示 motd。
在 /etc/update-motd.d/ 中有 11 个文件!
/etc/pam.d/sshd 和 /etc/pam.d/login 中有一些与 motd 相关的内容
也许通过查看最后两个文件,您就会得到有关如何解决问题的线索。
祝你好运 ;)