SSH port change (Centos)
SSHD settings
- vi /etc/ssh/sshd_config
- Port {port number}
- service sshd restart
Firewall setting
- vi /etc/sysconfig/iptables
- -A input -M State —State New -M TCP -P TCP {Port} -J Accept
- service iptables restart
* After changing the SSH port, the firewall setting allows you to use that port.
Leave a Reply