Changing SSH Port (CentOS)
SSHD Configuration
- vi /etc/ssh/sshd_config
- Port {port_number}
- service sshd restart
Firewall Configuration
- vi /etc/sysconfig/iptables
- -A INPUT -m state --state NEW -m tcp -p tcp --dport {port} -j ACCEPT
- service iptables restart
* After changing the SSH port, ensure that the firewall is configured to allow traffic on that port.











Leave a Reply