IT/LINUX

CentOS7 SSH Port 변경

ssung85 2020. 10. 16. 11:08
728x90

보안상 ssh(22) 포트를 변경 해야 되는 경우가 있다.

 

변경 방법은 간단하다.

 

#vi /etc/ssh/sshd_config >> Port 2222 수정

 

semanage port -a -t ssh_port_t -p tcp 2222

yum -y install policycoreutils-python << 명령 안되면 설치

 

netstat -anp | grep LISTEN | grep sshd >> open 확인

728x90