Changing SSH Port (CentOS)

Changing SSH Port (CentOS)

SSHD Configuration

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

Firewall Configuration

  1. vi /etc/sysconfig/iptables
  2. -A INPUT -m state --state NEW -m tcp -p tcp --dport {port} -j ACCEPT
  3. service iptables restart

* After changing the SSH port, ensure that the firewall is configured to allow traffic on that port.

Leave a Reply

이메일 주소는 공개되지 않습니다. (* 질문, 건의사항 등은 "질문게시판"을 이용해주세요)