1、編輯vim
終端執行下面命令:ssh
vim /etc/ssh/sshd_config
修改端口參數(默認端口是22)把rest
#Port 22
改爲code
Port 422
備註:去掉前面的註釋#service
2、重啓終端
#service sshd restart