修改配置文件 sudo vim /etc/ssh/sshd_config 端口设成22 去掉#更改成yes 去掉#改成yes 保存退出 重启ssh服务 sudo service sshd restart