#!/bin/bash

cat > /etc/ssh/banner <<EOF
#########################################
# Operation System Configure Management #
# http://www.netkiller.cn/              #
#########################################

  _   _      _   _    _ _ _                       ____   _____  _____ __  __             ____                    _____ _____ _    _ 
 | \ | |    | | | |  (_) | |                     / __ \ / ____|/ ____|  \/  |           / __ \                  / ____/ ____| |  | |
 |  \| | ___| |_| | ___| | | ___ _ __   ______  | |  | | (___ | |    | \  / |  ______  | |  | |_ __   ___ _ __ | (___| (___ | |__| |
 | . . |/ _ \ __| |/ / | | |/ _ \ '__| |______| | |  | |\___ \| |    | |\/| | |______| | |  | | '_ \ / _ \ '_ \ \___ \\___ \|  __  |
 | |\  |  __/ |_|   <| | | |  __/ |             | |__| |____) | |____| |  | |          | |__| | |_) |  __/ | | |____) |___) | |  | |
 |_| \_|\___|\__|_|\_\_|_|_|\___|_|              \____/|_____/ \_____|_|  |_|           \____/| .__/ \___|_| |_|_____/_____/|_|  |_|
                                                                                              | |                                   
                                                                                              |_|                                   

EOF

vim /etc/ssh/sshd_config <<EOF > /dev/null 2>&1
:%s$#Banner none$Banner /etc/ssh/banner$
:wq
EOF

systemctl restart sshd
