注意
本文的内容已经合并,失效,或已不具有参考价值,请查看给出的重定向链接。
15 秒后自动重定向至: Ubuntu (Debian) 服务器的初始化配置
本文介绍如何在 Debian 9 上启用对于 SSH 登录的两步验证,2FA 使用 Google Authenticator 。示例命令以 root
用户身份运行。
安装 Google Authenticator
运行命令:
1 | apt update |
为当前用户配置 Google Authenticator
运行:
1 | google-authenticator |
将出现一些问题:
1 | Do you want authentication tokens to be time-based (y/n) |
y
回答完此问题后,会出现二维码、Key,还有备用码,用手机的 Google Authenticator 扫描二维码或手动键入 Key,即可添加二步验证码,另外保存好备用码到一个安全的地方,以防手机丢失。