본문 바로가기

IT 기술/코드샘플

centOS 구글 otp 적용

#google otp 설치 

sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install google-authenticator



#하기내용 제일 하단에 추가
sudo vi /etc/pam.d/sshd

auth    required    pam_google_authenticator.so nullok



#하기 설정 다음과같이 변경
sudo vi /etc/ssh/sshd_config

PermitEmptyPasswords no
PasswordAuthentication no
ChallengeResponseAuthentication yes
UsePAM yes



#sshd 재시작
systemctl restart sshd

#google authenticator 인증파일생성
google-authenticator
#전부 y

#설치가 완료되면 상단에 qr 링크가 생성됨


'IT 기술 > 코드샘플' 카테고리의 다른 글

구글 OTP 각서버 동일하게 적용  (0) 2021.07.12
Jenkins gitLab 연동하기  (0) 2021.05.25
GitLab 설치  (0) 2021.05.20
Jenkins 설치  (0) 2021.05.18
Jenkins로 tomcat 배포하기(gitLab)  (0) 2021.05.18