System/Linux

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

2023. 6. 20. 16:21

😱 Error / 문제점

 

ssh 포트 번호 변경을 한 후 아래의 명령어를 사용하니까 에러메시지가 떴다.

systemctl restart sshd

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

 

🔍 이유 및 해결방법

 

selinux가 active 되어 있어서 발생한 것이다.

1. selinux Permissive로 전환 및 확인

setenforce 0
getenforce

2. selinux를 disabled로 설정

vi /etc/sysconfig/selinux

3.

systemctl restart sshd