修改ssh登录的banner信息
#查看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