This project will be close, because using OAuth method will be deprecate. please see it: https://developers-jp.googleblog.com/2022/03/oauth-google-oauth.html
pam-google-web-oauth is ssh authentication software. this provides you multi-factor authentication.
$ curl -s https://pam-google-web-oauth.lolipop.io/install.sh | bash -
-
Get the oAuth client ID on google.
-
set binary.
- debian: /lib/x86_64-linux-gnu/security/pam-google-web-oauth.so
- centos: /lib64/security/pam-google-web-oauth.so
-
Write the following in /etc/pam.d/sshd
auth required pam-google-web-oauth.so client_id=%CLIENT_ID% client_secret=%CLIENT_SECRET% user_dir=/opt/pam-google-web-oauth
#@include common-auth # must comment out.
- Write the following in sshd_config and restart sshd process.
KbdInteractiveAuthentication yes
UsePAM yes
AuthenticationMethods publickey,keyboard-interactive
ChallengeResponseAuthentication yes
- Fork (https://github.com/pyama86/google-web-oauth/fork)
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Run test suite with the
go test ./...
command and confirm that it passes - Run
gofmt -s
- Create a new Pull Request