vi /etc/ssh/sshd_config
Inside the SSH configuration file, locate the SSH port usually named #Port 22. Remove the “#” symbol at the beginning, and modify the port number to your choice like Port 2222
Save the changes after modification and close. After
service sshd restart
