1. Enter this directory.
# cd /etc/ssh
2. Edit its configuration file sshd_config.
# vim sshd_config
I found a line #Port 22 in it. This line is very forward, almost not far from the beginning of the document. Remove the # sign from this line.
Then add the port number you want to change, and I'll change it to 2343 here.
Port 2343
4. Restart the sshd service
# servicesshd restart
5. Change the ssh port to 2343.
Pay attention to changing the port number when connecting ssh.
Such as ssh192.168.11.122343.