Kilho.net
IT

SSH Port Change (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, configure the firewall to allow that port to be used.

Để lại một bình luận

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *