sestatus</code></pre></div><h3>getenforce</h3><p>현재 SELinux 모드를 한 단어로 보여줍니다.</p><p><br class="ProseMirror-trailingBreak"></p><p><code data-backticks="1">Enforcing</code>이면 정책을 실제로 강제하고, <code data-backticks="1">Permissive</code>이면 위반을 기록만 하며, <code data-backticks="1">Disabled</code>이면 SELinux가 꺼져 있습니다.</p><h3>sestatus</h3><p>SELinux의 전체 상태와 정책 정보를 보여줍니다.</p><p><br class="ProseMirror-trailingBreak"></p><p>운영 점검에서는 <code data-backticks="1">getenforce</code>로 빠르게 보고, 상세 보고서에는 <code data-backticks="1">sestatus</code> 결과를 남깁니다.</p><div contenteditable="false"><hr></div><h2>3) SSH 설정 변경 전 검증</h2><div data-language="bash" class="toastui-editor-ww-code-block"><pre><code data-language="bash">sshd -t
systemctl restart sshd
systemctl status sshd --no-pager</code></pre></div><h3>sshd -t</h3><p>SSH 설정 파일 문법을 검사합니다.</p><p><br class="ProseMirror-trailingBreak"></p><p>이 검사를 생략하고 재시작하면 설정 오류 때문에 SSH 접속이 끊길 수 있습니다.</p><h3>systemctl restart sshd</h3><p>문법 검사가 성공한 뒤 SSH 서비스를 재시작합니다.</p><p><br class="ProseMirror-trailingBreak"></p><p>원격 서버에서는 가능하면 기존 접속 세션을 유지한 상태에서 새 접속 테스트를 먼저 해야 합니다.</p><h3>systemctl status sshd</h3><p>재시작 후 서비스가 정상인지 확인합니다.</p><p><br class="ProseMirror-trailingBreak"></p><p><code data-backticks="1">active (running)</code> 상태와 오류 로그를 함께 확인합니다.</p><div contenteditable="false"><hr></div><h2>신규직원 실습 절차</h2><ol><li><p>SSH 인증 정책을 확인합니다.</p></li><li><p>SELinux 상태를 확인합니다.</p></li><li><p>설정 변경 전 문법 검사를 수행합니다.</p></li><li><p>재시작 후 새 접속 테스트와 서비스 상태 확인을 진행합니다.</p></li></ol><div contenteditable="false"><hr></div><h2>연계실습</h2><ul><li><p>연계실습 텍스트: SSH/SELinux 보안 기본선 적용</p></li><li><p>실습 바로 시작: <a href="https://learnix.kr/server_cbt?id=221&amp;from=%2Flearn_linux">문제 221 실습 시작하기 →</a></p></li></ul><div contenteditable="false"><hr></div>
<!-- publish_key:rocky8-day09-post -->
---
## 연계 실습
이 글에서 다룬 내용을 직접 명령어로 쳐 보면 훨씬 오래 남습니다.
- [RHCSA 보안 설정 실습 문제 →](https://learnix.kr/rhcsa)
- [리눅스마스터 실기 SSH 문제 풀이 →](https://learnix.kr/linuxmaster)

댓글 0