Linux

systemctl restart sshd 에러 발생

seongduck 2025. 5. 16. 17:10

 해당 명령어 실행 시 장애가 날 경우

systemctl restart sshd

 

Job for sshd.service failed because the control process exited with error code. See "systemctl status sshd.service" and "journalctl -xe" for details.

 

Linux의 기본 보안인 SELinux가 해당 포트를 차단하고 있어서 그렇다. (SSH 보안접속 이므로)

semanage 설치 및 해당 포트 오픈

sudo dnf install -y policycoreutils-python-utils # semanage 설치
sudo semanage port -a -t ssh_port_t -p tcp 12345 # 해당 포트 오픈

 

다시 실행 시 해결 완료!