CentOS

Change ssh port , CentOS 8

Cent OS support firewall-cmd & SeLinux, Its environment understood not easily.  ssh port changing is very easy !Edit /etc/ssh/sshd_config. Find “# Port 22″ and change to Port xxxx” (xxxx is your specified). # If you want to change the port on a SELinux system, you have to tell # SELinux about this change. # semanage port -a -t ssh_port_t -p tcp #PORTNUMBER # Port xxxx <— Change your specified port number. #AddressFamily any #ListenAddress 0.0.0.0 #ListenAddress :: if execute “sudo systemctl restart sshd.service”, you can find error messages. And execute “sudo systemctl status sshd.service” ● sshd.service – OpenSSH server daemon Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled) Active: activating (auto-restart)…