1、编辑vim
终端执行下面命令:ssh
vim /etc/ssh/sshd_config
修改端口参数(默认端口是22)把rest
#Port 22
改为code
Port 422
备注:去掉前面的注释#service
2、重启终端
#service sshd restart