IT/linux
[linux] Google Authenticator
주니-
2022. 9. 30. 11:03
환경
OS : Ubuntu 20.04 LTS
apt install libpam-google-authenticator
# 2차 인증 적용할 계정으로 전환
su - ${id}
google-authenticator
vi /etc/pam.d/sshd
# 추가
# google otp
auth required pam_google_authenticator.so nullok
vi /etc/ssh/sshd_config
# 변경
UsePAM yes
ChallengeResponseAuthentication Yes
systemctl restart sshd
# key 조회 가능
cat /home/${user}/.google_authenticator