我正在尝试为我公司的OpenVPN服务器生成登录信息。它使用Google-Authenticator,我需要将图像提取给客户端。
问题是;它验证的唯一方法是默认选项(全部是)。像这样:
tester@VirtualBox:~$ google-authenticator
Do you want authentication tokens to be time-based (y/n) y
https://www.google.com/link // qrcode link
[QRCode image here, can't redirect to file]
Your new secret key is: xxx
Your verification code is xxx
Your emergency scratch codes are:
xxx
xxx
xxx
xxx
xxx
Do you want me to update your "/home/tester/.google_authenticator" file (y/n) y
Do you want to disallow multiple uses of the same authentication
token? This restricts you to one login about every 30s, but it increases
your chances to notice or even prevent man-in-the-middle attacks (y/n) y
By default, tokens are good for 30 seconds and in order to compensate for
possible time-skew between the client and the server, we allow an extra
token before and after the current time. If you experience problems with poor
time synchronization, you can increase the window from its default
size of 1:30min to about 4min. Do you want to do so (y/n) y
If the computer that you are logging into isn't hardened against brute-force
login attempts, you can enable rate-limiting for the authentication module.
By default, this limits attackers to no more than 3 login attempts every 30s.
Do you want to enable rate-limiting (y/n) y
我尝试设置标志;然后将其重定向到文件,抓取图像URL但它与默认值不匹配(验证失败):
google-authenticator -t -d -f -r 3 -R 30 -W > ~/test.txt
所以问题是:
如何解决这个问题?我用java,btw。