diff --git a/ssh_port.sh b/ssh_port.sh index cab1891..dda0c79 100644 --- a/ssh_port.sh +++ b/ssh_port.sh @@ -21,8 +21,8 @@ elif [[ -e ${SSH_init_2} ]]; then else echo -e "${Error} 找不到 SSH 的服务脚本文件!" && exit 1 fi -bak_text="(可通过备份SSH配置文件复原:[ ${Green_font_prefix}rm -rf /etc/ssh/sshd_config && mv /etc/ssh/sshd_config.bak /etc/ssh/sshd_config && rm -rf /etc/ssh/sshd_config.bak && ${SSH_init} restart${Font_color_suffix} ])" -over_text="${Tip} 当服务器存在外部防火墙时(如 阿里云、腾讯云、微软云、谷歌云、亚马逊云等),需要外部防火墙开放 新SSH端口TCP协议方可连接!" +bak_text="(可通过备份SSH配置文件复原:[ ${Green_font_prefix}rm -rf /etc/ssh/sshd_config && mv /etc/ssh/sshd_config.bak /etc/ssh/sshd_config && ${SSH_init} restart${Font_color_suffix} ])" +over_text="${Tip} 当服务器存在外部防火墙时(如 阿里云、腾讯云、微软云、谷歌云、亚马逊云等),需要外部防火墙开放 新SSH端口TCP协议方可连接!(如使用途中出现任何问题均可通过该代码复原:[ ${Green_font_prefix}rm -rf /etc/ssh/sshd_config && mv /etc/ssh/sshd_config.bak /etc/ssh/sshd_config && ${SSH_init} restart${Font_color_suffix} ] )" Green_font_prefix="\033[32m" && Red_font_prefix="\033[31m" && Green_background_prefix="\033[42;37m" && Red_background_prefix="\033[41;37m" && Font_color_suffix="\033[0m" Info="${Green_font_prefix}[信息]${Font_color_suffix}" && Error="${Red_font_prefix}[错误]${Font_color_suffix}" && Tip="${Green_font_prefix}[注意]${Font_color_suffix}" @@ -127,7 +127,7 @@ Direct_modification(){ Add_iptables_ACCEPT Add_iptables_DROP Set_iptables - rm -rf /etc/ssh/sshd_config.bak + #rm -rf /etc/ssh/sshd_config.bak echo -e "${Info} SSH 端口修改成功!新端口:[${Green_font_prefix}${new_port}${Font_color_suffix}]" echo -e "${over_text}" fi @@ -170,7 +170,7 @@ Conservative_modifications(){ else Add_iptables_DROP Set_iptables - rm -rf /etc/ssh/sshd_config.bak + #rm -rf /etc/ssh/sshd_config.bak echo -e "${Info} 所有配置完成!新端口:[${Green_font_prefix}${new_port}${Font_color_suffix}]" echo -e "${over_text}" fi