#查看banner信息配置文件
root@redis04:~# cat /etc/motd
----------
< zyjsuper >
----------
\
\
.::!!!!!!!:.
.!!!!!:. .:!!!!!!!!!!!!
~~~~!!!!!!. .:!!!!!!!!!UWWW$$$
:$$NWX!!: .:!!!!!!XUWW$$$$$$$$$P
$$$$$##WX!: .<!!!!UW$$$$" $$$$$$$$#
$$$$$ $$$UX :!!UW$$$$$$$$$ 4$$$$$*
^$$$B $$$$\ $$$$$$$$$$$$ d$$R"
"*$bd$$$$ '*$$$$$$$$$$$o+#"
"""" """""""
#設置成yes則顯示mtod文件中設置的banner信息。
root@redis04:~# grep Motd /etc/ssh/sshd_config
PrintMotd no
#安裝自定義banner的工具
root@redis04:~# apt install -y figlet cowsay
#顯示cowsay命令支持的自帶模板
root@redis04:~# /usr/games/cowsay -l
Cow files in /usr/share/cowsay/cows:
apt bud-frogs bunny calvin cheese cock cower daemon default dragon
dragon-and-cow duck elephant elephant-in-snake eyes flaming-sheep fox
ghostbusters gnu hellokitty kangaroo kiss koala kosh luke-koala
mech-and-cow milk moofasa moose pony pony-smaller ren sheep skeleton
snowman stegosaurus stimpy suse three-eyes turkey turtle tux unipony
unipony-smaller vader vader-koala www
#使用指定的模板顯示自定義的文字信息
root@redis04:~# /usr/games/cowsay -f eyes zyjsuper
__________
< zyjsuper >
----------
\
\
.::!!!!!!!:.
.!!!!!:. .:!!!!!!!!!!!!
~~~~!!!!!!. .:!!!!!!!!!UWWW$$$
:$$NWX!!: .:!!!!!!XUWW$$$$$$$$$P
$$$$$##WX!: .<!!!!UW$$$$" $$$$$$$$#
$$$$$ $$$UX :!!UW$$$$$$$$$ 4$$$$$*
^$$$B $$$$\ $$$$$$$$$$$$ d$$R"
"*$bd$$$$ '*$$$$$$$$$$$o+#"
"""" """""""
#將自定義的banner信息加入到.bashrc文件中
root@redis04:~# grep cowsay ~/.bashrc
/usr/games/cowsay -f eyes zyjsuper
#重新編譯openssh,自定義openssh的版本信息
root@redis04:~# apt install libssl-dev zlib1g-dev
root@redis04:~# wget https://ftp.riken.jp/pub/OpenBSD/OpenSSH/portable/openssh-8.1p1.tar.gz
root@redis04:~# tar zxvf openssh-8.1p1.tar.gz && cd openssh-8.1p1
root@redis04:~/openssh-8.1p1# sed -i 's/OpenSSH_8.1/OpenSSH_9.0/g' version.h
root@redis04:~# ./configure && make install
root@redis04:~# systemctl restart sshd