执行以下命令,修改sshd服务的配置文件
vi /etc/ssh/sshd_config
找到port,默认是注释了的 22
打开注释,将22改成想要的端口号
重启服务
service sshd restart