1、修改配置文件:/etc/ssh/sshd_config ,找到#port 22
2、先将Port 22 前面的 # 号去掉,并另起一行。如定义SSH端口号为22233、把22修改成22233即可
service sshd restart