How to block port 22 in Linux?
Disable TCP/22 by commenting it out in the sshd_config file. Disable TCP/22 by modifying /etc/services so that the only open SSH port is TCP/33001. In OpenSSH versions 4.4 and later, disable SSH tunneling to avoid potential attacks by adding the following lines at the end of the sshd_config file.