例如我们现在需要将ssh默认端口22改为33 1、打开ssh配置文件 vi /etc/ssh/sshd_config 2、在#Port 22 下面加入一行 Port 33 后保存 3、重启ssh服务 systemctl restart sshd