SSH port change (Centos)

SSH port change (Centos)

SSHD settings

  1. vi /etc/ssh/sshd_config
  2. Port {port number}
  3. service sshd restart

Firewall setting

  1. vi /etc/sysconfig/iptables
  2. -A input -M State —State New -M TCP -P TCP {Port} -J Accept
  3. service iptables restart

* After changing the SSH port, the firewall setting allows you to use that port.

guest
0 Comments
Inline Feedbacks
View all comments