使用Yubikey登录Windows系统

在尝试了使用Yubikey无密码登录SSH的复杂操作后,我又用Yubikey登录了我的windows系统。

这个操作相对简单一些, 在使用YubiKey 登录Windows系统之前,以下几个条件都需要先满足:

  1. Windows系统必须是Windows 10或以上版本,并已经安装了最新的更新。
  2. Yubikey 是 Yubikey 4系列 或 5系列, 4 或5 的FIPS版本也可以。
  3. 如果windows是加入Azure AD的,确保AAD管理员已经允许使用Security key登录了。

确认以上步骤,就可以开始设置YubiKey。

在Windows中配置通过Yubikey来登录系统

步骤1:插入YubiKey

把YubiKey 插入相应的USB插口,并确保它已正确连接。

步骤2:安装驱动程序

安装YubiKey Smart Card Minidriver,确保它是4.1以上的版本。

https://www.yubico.com/support/download/smart-card-drivers-tools/

注:如果smartcard的驱动不正确,你可能会看到错误信息”No Valid Certificates Were Found on This Smart Card“

步骤3:在登录选项中添加YubiKey

  1. 进入Windows设置的account->Sign-in options
  2. 打开Security key
  3. 按提示添加你的Yubikey

注:如果没有“Security Key”这个选项,可以添加两个Windows注册表项,然后再将其与YubiKey 捆绑在一起。在注册表中添加以下两个项:HKEY_LOCAL_MACHINE \ Software \ Microsoft \ Windows \ CurrentVersion \ Authentication \ Credentials \ Provider \ {8bf9a910-a8ff-11d2-93e0-00c04f72dfcd}和HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Authentication \ Credential Providers \ {8bf9a910-a8ff-11d2-93e0-00c04f72dfcd}。这将允许Windows使用YubiKey 作为登录方式。

步骤4:激活Security Key Sign-in

  1. 打开Local Group Policy Editor
  2. 在computer cnfiguration ->Administrative Templates->System->Logon下,将”Turn on security key sign-in”

没有这一步,你可能在windows的登录界面是看不到一把钥匙的图标。

使用Yubikey来登录Windows

步骤1:开机,插入YubiKey

  1. 开机
  2. 把YubiKey 插入相应的USB插口,并确保它已正确连接。

步骤2:输入Yubikey的Pin

你仍需要输入Yubikey的Pin

步骤3:轻触Yubikey完成登录

成功登录,一切正常

再附上几条测试命令和链接

总结

我们可以通过Yubikey来替代传统密码登录。尽管也需要输入Pin,但作为硬件产品安全性自然要高一些,同时输入6位Pin也比密码要简单些。

作为Yubikey的另一个进阶应用,它还能让你觉得用来买Yubikey钱,没有完全打水漂。

一条评论

留下评论

您的电子邮箱地址不会被公开。 必填项已用 * 标注