码迷,mamicode.com
首页 > 系统相关 > 详细

Ubuntu18.04 SSH登录欢迎界面修改

时间:2020-05-03 18:31:44      阅读:104      评论:0      收藏:0      [点我收藏+]

标签:new   run   mem   界面   x86   reboot   alt   fsck   span   

# 删除多余欢迎界面读取信息的文件
cd /etc/update-motd.d
rm -rf 10-help-text 50-motd-news 80-esm 80-livepatch 90-updates-available 91-release-upgrade 92-unattended-upgrades  95-hwe-eol 97-overlayroot 98-fsck-at-reboot 98-reboot-required

# 安装figlet(文本转换为大字母)
apt-get install  figlet
figlet Server02 > /etc/Server02.txt

# 生成欢迎界面读取的文件
cat <<EOF>> 00-header
#!/bin/sh
cat /etc/Server02.txt
EOF

# 检测是否成功run-parts 
mv /run/motd.dynamic /run/motd.dynamic_bak
ln -s /etc/update-motd.d/ /run/motd.dynamic
run-parts /etc/update-motd.d/

 

效果:

Connecting to 192.168.0.169:2202...
Connection established.
To escape to local shell, press Ctrl+Alt+].

Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-99-generic x86_64)
 ____                            ___ ____  
/ ___|  ___ _ ____   _____ _ __ / _ \___ \ 
\___ \ / _ \ __\ \ / / _ \ __| | | |__) |
 ___) |  __/ |   \ V /  __/ |  | |_| / __/ 
|____/ \___|_|    \_/ \___|_|   \___/_____|
                                           

  System information as of Sun May  3 09:26:15 UTC 2020

  System load:  0.0                Processes:              189
  Usage of /:   12.5% of 48.96GB   Users logged in:        0
  Memory usage: 9%                 IP address for ens33:   10.10.10.2
  Swap usage:   0%                 IP address for docker0: 172.17.0.1
Last login: Sun May  3 09:25:37 2020 from 192.168.0.169

 

Ubuntu18.04 SSH登录欢迎界面修改

标签:new   run   mem   界面   x86   reboot   alt   fsck   span   

原文地址:https://www.cnblogs.com/killall007/p/12822651.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有 京ICP备13008772号-2
迷上了代码!