问题原文
原帖链接 · dan · CC BY-SA 3.0
I manage a server with two-factor authentication. I have to use the Google Authenticator iPhone app to get the 6-digit verification code to enter after entering the normal server password. The setup is described here: http://www.mnxsolutions.com/security/two-factor-ssh-with-google-authenticator.html
I would like a way to get the verification code using just my laptop and not from my iphone. There must be a way to seed a command line app that generates these verification codes and gives you the code for the current 30-second window.
Is there a program that can do this?
社区高分解答
原帖链接 · Adam Terrey · CC BY-SA 3.0
There is also a go implementation on github at https://github.com/pcarrier/gauth
This one uses a config file ~/.config/gauth.csv to store the tokens in a the following format
[email omitted]: abcd efg hijk lmno
aws-account: mygauthtoken
And the output is rather friendly too:
$ gauth
prev curr next
AWS 315306 135387 483601
Airbnb 563728 339206 904549
Google 453564 477615 356846
Github 911264 548790 784099
[======= ]
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
