처음 만나는 클라우드 보안

CentOS 7 ssh설정 본문

정보보안

CentOS 7 ssh설정

영민하게 2023. 5. 18. 22:44

CentOS7에는 기본적으로 openssh가 설치되어 있다.

 

1. openssh 확인

1) 상태 확인

 service sshd status

 systemctl status sshd 

 

2. ssh config 파일 설정

vi /etc/ssh/sshd_config

#Port 22 (주석 제거)

#PermitRootLogin yes (root 로그인 허용)

 

3. 방화벽 정책 허용

firewall-cmd --zone=public --add-port=22/tcp --permanet

 

4. openssh 재시작

 service sshd restart

 systemctl restart sshd 

 

active (running) 확인되면 ip 확인 후 root 권한 접속

 

Comments