vim /etc/ssh/sshd_config找到#Port 22,改成相应的端口号,并取消注释(最好保留22,等新端口确认没问题在干掉22)重启服务 systemctl restart sshd 或 /etc/init.d/sshd restart