「VMware の Linux 仮装マシンにYubiKeyを接続する方法」の版間の差分

提供: Ubuntu入門
移動: 案内検索
(ページの作成:「USBに接続して、'''Yubico''' の '''二要素認証''' で利用されるハードウェア '''YubiKey''' を VMware で実行中の Linux に接続する方法を...」)
(相違点なし)

2016年12月9日 (金) 11:35時点における版

USBに接続して、Yubico二要素認証 で利用されるハードウェア YubiKey を VMware で実行中の Linux に接続する方法を紹介します。

読み方

YubiKey
ゆびきー

概要

USB に YubiKey を接続しても、 仮想マシンの Linux で lsusb を叩いても、出てこない、といった状況に遭遇しました。 ホストOS側では、YubiKey から入力ができるので、パソコン自体は YubiKey を認識しているのですば、 VMware 側では、認識できていませんでした。

ですが、VM の設定を変更することで、VM から YubiKey を認識・接続することができます。

VM をシャットダウンする必要がありますが、簡単にできます。

設定

まず、VM/Linux をシャットダウンしてください。 VMware の仮装イメージの .vmx ファイルに以下の設定を追記します。

usb.generic.allowHID = "TRUE"

つなぎ方

VMware Player のメニューの Player から「取り外し可能デバイス」から Yubico.com Yubikey の「接続」を選択します。 ホストOS側で使えなくなるよ、と表示されますが、問題なければ、接続して下さい。

接続の確認

lsusb で Yubico.com と表示がされました。

$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 004: ID 1050:0114 Yubico.com 
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

dmesg でも USB デバイスの状況がわかります。

[  745.815860] usb 2-2.1: new full-speed USB device number 4 using uhci_hcd
[  746.111922] usb 2-2.1: New USB device found, idVendor=1050, idProduct=0114
[  746.111926] usb 2-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  746.111928] usb 2-2.1: Product: Yubikey NEO OTP+U2F
[  746.111930] usb 2-2.1: Manufacturer: Yubico
[  746.118152] input: Yubico Yubikey NEO OTP+U2F as /devices/pci0000:00/省略/input/input6
[  746.172383] hid-generic 0003:1050:0114.0003: input,hidraw2: USB HID v1.10
Keyboard [Yubico Yubikey NEO OTP+U2F] on usb-0000:02:00.0-2.1/input0
[  746.209852] hid-generic 0003:1050:0114.0004: hiddev0,hidraw3: USB HID v1.10
Device [Yubico Yubikey NEO OTP+U2F] on usb-0000:02:00.0-2.1/input1

関連項目