Linux
CentOS 7.x SSH root 접속 제한(sshd_config)
브이랜
2021. 7. 13. 22:14
1
2
3
4
5
6
7
8 |
echo "PermitRootLogin no" >> /etc/ssh/sshd_config
# /etc/ssh/sshd_config 파일 마지막에 PermitRootLogin no 항목 추가
# 기본으로 sshd_config 파일에 PermitRootLogin옵션은 주석(#)처리가 되어 있기 때문에
# 주석을 제거하고 no로 바꾸어도 된다.
systemctl restart sshd
# ssh 서비스 재시작
# 끝 |
cs |