打开 SSH 配置文件 sudo vim /etc/ssh/sshd_config 修改端口 修改 port 22 为 port xxxx 重启 SSH 服务 sudo /etc/init.d/ssh restart 参考 https://www.cnblogs.com/javafucker/p/8521316.html