咸鱼

咸鱼是以盐腌渍后,晒干的鱼

0%

Ubuntu关闭SSH终端登录广告

通过SSH登录 Ubuntu Server 会打印文字广告

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Welcome to Ubuntu 22.04.2 LTS (GNU/Linux 5.15.0-78-generic x86_64)

* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage

System information as of Thu Aug 3 06:37:55 AM UTC 2023

System load: 0.24560546875 Processes: 210
Usage of /: 3.6% of 195.80GB Users logged in: 1
Memory usage: 9% IPv4 address for ens33: ****
Swap usage: 0%


Expanded Security Maintenance for Applications is not enabled.

0 updates can be applied immediately.

Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status


关闭广告

1
2
3
4
5
6
7
8
$ vim /etc/pam.d/sshd 

# Print the message of the day upon successful login.
# This includes a dynamically generated part from /run/motd.dynamic
# and a static (admin-editable) part from /etc/motd.
# 注释掉这两行
session optional pam_motd.so motd=/run/motd.dynamic
session optional pam_motd.so noupdate

下次登录就不会有这个广告了。