{"id":12030,"date":"2024-07-12T19:48:54","date_gmt":"2024-07-12T10:48:54","guid":{"rendered":"https:\/\/www.stuffy.site\/computers\/?p=12030"},"modified":"2024-07-17T23:20:47","modified_gmt":"2024-07-17T14:20:47","slug":"yubikeyesxi6-7%e3%81%a7ubuntu%e3%81%ae%e3%83%8f%e3%83%bc%e3%83%89%e3%82%a6%e3%82%a7%e3%82%a2%e8%aa%8d%e8%a8%bc%e3%82%92%e3%81%97%e3%81%a6%e3%81%bf%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.stuffy.site\/computers\/archives\/12030","title":{"rendered":"Yubikey@ESXi6.7\u3067Ubuntu\u306e\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u8a8d\u8a3c\u3092\u3057\u3066\u307f\u308b"},"content":{"rendered":"\n<p>VMWare ESXi6.7\u30672\u6bb5\u968e\u8a8d\u8a3c\u304c\u3067\u304d\u308b\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30ad\u30fc\u300cYubikey\u300d\u3092\u4f7f\u3063\u3066Ubuntu\u306e\u7279\u6a29\u30e6\u30fc\u30b6\u30fc\u306b\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u8a8d\u8a3c\u3092\u3057\u3066\u307f\u305f\u3044\u3068Google\u5148\u751f\u306b\u8a0a\u3044\u305f\u3068\u3053\u308d\u3001\u307b\u307c\u601d\u3044\u901a\u308a\u306e\u8a2d\u5b9a\u304c\u3067\u304d\u305f\u306e\u3067\u3081\u3082\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>\u4eca\u56de\u306fTX1310 M3\u3092\u30d9\u30a2\u30e1\u30bf\u30eb\u3068\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305fVMWare ESXi 6.7\u306e\u30db\u30b9\u30c8\u304b\u3089USB\u30c7\u30d0\u30a4\u30b9\u306e\u30d1\u30b9\u30b9\u30eb\u30fc\u8a2d\u5b9a\u3092\u3057\u305f\u306e\u3061\u3001VM\u3067\u300cYubikey\u300d\u3092\u8a8d\u8b58\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066Ubuntu\u306e pam\u30e2\u30b8\u30e5\u30fc\u30eb\u300cuf2\u300d\u306b\u3066\u8a8d\u8a3c\u6a5f\u80fd\u3092\u5b9f\u88c5\u3057\u3066\u884c\u3053\u3046\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u53c2\u8003\u306b\u3057\u305f\u306e\u306f\u4ee5\u4e0b\u306e\u30b5\u30a4\u30c8\u3067\u3059\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/www.reddit.com\/r\/vmware\/comments\/pqkymd\/esxi_65_yubikey_passthrough_success\/?rdt=49796\">ESXi 6.5 Yubikey Passthrough (success!) &#8211; reddit<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/pc.watch.impress.co.jp\/docs\/column\/ubuntu\/1483060.html\">Ubuntu\u65e5\u548c\u3010\u7b2c22\u56de\u3011\u5f37\u56fa\u306a\u30d1\u30b9\u30ef\u30fc\u30c9\u3068\u4e8c\u8981\u7d20\u8a8d\u8a3c\u3067Ubuntu\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3092\u3055\u3089\u306b\u9ad8\u3081\u3088\u3046<\/a><\/p>\n\n\n\n<p>\u4ee5\u524d\u306b\u3082\u300cYubikey\u300d\u3092\u4f7f\u3063\u3066Google\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\uff12\u6bb5\u968e\u8a8d\u8a3c\u306b\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30ad\u30fc\u3092\u8ffd\u52a0\u3057\u305f\u308a\u3001Wordpress\u306e\u30ed\u30b0\u30a4\u30f3\u753b\u9762\u306e\u8ffd\u52a0\u8a8d\u8a3c\u3068\u3057\u3066\u91cd\u5b9d\u3057\u3066\u3044\u307e\u3057\u305f\u3002\uff08\u5f53\u62d9\u904e\u53bb\u30d6\u30ed\u30b0\u3092\u3054\u53c2\u8003\u307e\u3067\u3002\uff09<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"o5VjjtAQ0m\"><a href=\"https:\/\/www.stuffy.site\/computers\/2022\/07\/21\/yubikey%e3%81%ab%e3%82%88%e3%82%8bnfc%e8%aa%8d%e8%a8%bcgoogle%e3%82%a2%e3%82%ab%e3%82%a6%e3%83%b3%e3%83%88%e7%b7%a8\/\">YubiKey\u306b\u3088\u308bNFC\u8a8d\u8a3c@Google\u30a2\u30ab\u30a6\u30f3\u30c8\u7de8<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;YubiKey\u306b\u3088\u308bNFC\u8a8d\u8a3c@Google\u30a2\u30ab\u30a6\u30f3\u30c8\u7de8&#8221; &#8212; \u65b0\u30c7\u30b8\u30bf\u30eb\u751f\u6d3b\u3081\u3082\" src=\"https:\/\/www.stuffy.site\/computers\/2022\/07\/21\/yubikey%e3%81%ab%e3%82%88%e3%82%8bnfc%e8%aa%8d%e8%a8%bcgoogle%e3%82%a2%e3%82%ab%e3%82%a6%e3%83%b3%e3%83%88%e7%b7%a8\/embed\/#?secret=xEys7cSGfY#?secret=o5VjjtAQ0m\" data-secret=\"o5VjjtAQ0m\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"48biQIWspb\"><a href=\"https:\/\/www.stuffy.site\/computers\/2022\/07\/26\/%e3%81%b7%e3%81%a1%e3%82%b9%e3%82%bf%e3%83%87%e3%82%a3wordpress-yubikey-2%e6%ae%b5%e9%9a%8e%e8%aa%8d%e8%a8%bc%e3%83%97%e3%83%a9%e3%82%b0%e3%82%a4%e3%83%b3\/\">\u3077\u3061\u30b9\u30bf\u30c7\u30a3@WordPress YubiKey 2\u6bb5\u968e\u8a8d\u8a3c\u30d7\u30e9\u30b0\u30a4\u30f3<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;\u3077\u3061\u30b9\u30bf\u30c7\u30a3@WordPress YubiKey 2\u6bb5\u968e\u8a8d\u8a3c\u30d7\u30e9\u30b0\u30a4\u30f3&#8221; &#8212; \u65b0\u30c7\u30b8\u30bf\u30eb\u751f\u6d3b\u3081\u3082\" src=\"https:\/\/www.stuffy.site\/computers\/2022\/07\/26\/%e3%81%b7%e3%81%a1%e3%82%b9%e3%82%bf%e3%83%87%e3%82%a3wordpress-yubikey-2%e6%ae%b5%e9%9a%8e%e8%aa%8d%e8%a8%bc%e3%83%97%e3%83%a9%e3%82%b0%e3%82%a4%e3%83%b3\/embed\/#?secret=r5wzcUfOoV#?secret=48biQIWspb\" data-secret=\"48biQIWspb\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u307e\u305aTX1310 M3\u306e\u7b50\u4f53\u306b\u5dee\u3057\u305f\u300cYubikey\u300d\u3092\u8a8d\u8b58\u3059\u308b\u3088\u3046\u306bESXi\u30db\u30b9\u30c8\u306bSSH\u63a5\u7d9a\u3057\u3066\u5404\u7a2e\u8a2d\u5b9a\u3092\u3059\u308b\u306e\u3067VM\u3092\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3\u3057\u3066\u304b\u3089\u884c\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n<pre>[root@esx:~]<span style=\"font-size:14pt;color: #0000ff;\"> lsusb | grep Yubi<br \/><br \/><\/span><span style=\"color: #ff0000;\">Bus 004 Device 002: ID 1050:0404 Yubico.com Yubikey 4 CCID<br \/><br \/><\/span>(ID\u306f\u500b\u5225\u74b0\u5883\u3067\u9055\u3044\u307e\u3059\u306e\u3067\u9069\u5b9c\u3001\u8aad\u307f\u66ff\u3048\u3066\u304f\u3060\u3055\u3044\u3002)\n<\/pre>\n\n\n<p><\/p>\n\n\n<pre>[root@esx:~]<span style=\"font-size: 14pt; color: #0000ff;\"> vi \/etc\/vmware\/config<br \/><\/span><span style=\"color: #ff0000;\"><br \/>usb.quirks.device0 = \"0x1050:0x0404 allow\"<br \/><br \/><\/span>(ID\u306f\u500b\u5225\u74b0\u5883\u3067\u9055\u3044\u307e\u3059\u306e\u3067\u9069\u5b9c\u3001\u8aad\u307f\u66ff\u3048\u3066\u304f\u3060\u3055\u3044\u3002)\n<\/pre>\n\n\n<p><\/p>\n\n\n<pre>[root@esx:~]<span style=\"font-size:14pt;color: #0000ff;\"> vi \/bootbank\/boot.cfg<br \/><br \/><\/span><span style=\"color: #ff0000;\">kernelopt=no-auto-partition CONFIG.\/USB\/quirks=0x1050:0x0404::0xffff:UQ_KBD_IGNORE<\/span><br \/><br \/>(ID\u306f\u500b\u5225\u74b0\u5883\u3067\u9055\u3044\u307e\u3059\u306e\u3067\u9069\u5b9c\u3001\u8aad\u307f\u66ff\u3048\u3066\u304f\u3060\u3055\u3044\u3002)\n<\/pre>\n\n\n<p>\u6b21\u306bVM\u306e[\u7de8\u96c6]\u304b\u3089[\u4eee\u60f3\u30de\u30b7\u30f3\u30aa\u30d7\u30b7\u30e7\u30f3]-[\u69cb\u6210\u30d1\u30e9\u30e1\u30fc\u30bf]-[\u8a2d\u5b9a\u306e\u7de8\u96c6]\u3068\u8fbf\u3063\u3066\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u8ffd\u52a0\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n<table style=\"margin: auto;\">\n<tbody>\n<tr>\n<td style=\"text-align: center;\">\u30ad\u30fc<\/td>\n<td style=\"text-align: center;\">\u5024<\/td>\n<\/tr>\n<tr>\n<td>usb.generic.allowHID<\/td>\n<td style=\"text-align: center;\">TRUE<\/td>\n<\/tr>\n<tr>\n<td>usb.generic.allowLastHID<\/td>\n<td style=\"text-align: center;\">TRUE<\/td>\n<\/tr>\n<tr>\n<td>usb.generic.allowCCID<\/td>\n<td style=\"text-align: center;\">TRUE<\/td>\n<\/tr>\n<tr>\n<td>usb.quirks.device0<\/td>\n<td style=\"text-align: center;\">0x1050:0x0404 allow<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n\n<p>\uff08\u30c7\u30d0\u30a4\u30b9ID\u306f\u5b9f\u969b\u3068\u306f\u7570\u306a\u308b\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\uff09<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30db\u30b9\u30c8\u3092\u518d\u8d77\u52d5<\/h2>\n\n\n\n<p>\u3053\u3053\u307e\u3067\u8a2d\u5b9a\u304c\u7d42\u308f\u3063\u305f\u3089\u4e00\u65e6\u3001\u30db\u30b9\u30c8\u3092\u518d\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>VM\u306e\u69cb\u6210\u306b [USB\u30c7\u30d0\u30a4\u30b9]\u304b\u3089\u30dd\u30fc\u30c8\u306b\u5dee\u3057\u305fYubikey\u304c\u300cYubico.com Yubikey OTP+FIDO+CCID\u300d\u3068\u3057\u3066\u8a8d\u8b58\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"649\" src=\"https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2024\/07\/device_recognization.png\" alt=\"\" class=\"wp-image-12033\" srcset=\"https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2024\/07\/device_recognization.png 800w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2024\/07\/device_recognization-300x243.png 300w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2024\/07\/device_recognization-768x623.png 768w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2024\/07\/device_recognization-24x19.png 24w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2024\/07\/device_recognization-36x29.png 36w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2024\/07\/device_recognization-48x39.png 48w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"has-text-align-right\">.<\/p>\n\n\n\n<p>\u7d9a\u3044\u3066\u3001Ubuntu VM\u3092\u8d77\u52d5\u3057\u3066Yubikey\u306ePAM\u30e2\u30b8\u30e5\u30fc\u30eb\u300c u2f \u300d\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n\n\n<pre><span style=\"color:#0000ff\">$ sudo apt install libpam-u2f<\/span><\/pre>\n\n\n<p>\u30e6\u30fc\u30b6\u30fc\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u3053\u3053\u3067\u306fpamu2fcfg \u3092sudo\u3067\u5b9f\u884c\u3057\u307e\u3059<\/p>\n\n\n<pre><span style=\"color:#0000ff\">$ mkdir -p ~\/.config\/Yubico\n$ sudo pamu2fcfg > ~\/.config\/Yubico\/u2f_keys<\/span><\/pre>\n\n\n<p>\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u306e\u30e6\u30fc\u30b6\u30fc\u540d\u3092\u300croot\u300d\u304b\u3089\u300c\uff08\u30e6\u30fc\u30b6\u30fc\u540d\uff09\u300d\u306b\u7de8\u96c6<\/p>\n\n\n<pre><span style=\"color:#0000ff\">$ vi .config\/Yubico\/u2f_keys<\/span>\nroot:j1myua84jJcxVYDqWWVDV\u30fb\u30fb\u30fb\u30fb\u30fb\n\u2193\n(\u30e6\u30fc\u30b6\u30fc\u540d):j1myua84jJcxVYDqWWVDV\u30fb\u30fb\u30fb<\/pre>\n\n\n<p>\u6700\u5f8c\u306b\u3001\/etc\/pam.d\/sudo \/etc\/pam.d\/sudo-i \u306b\u8a8d\u8a3c\u30dd\u30ea\u30b7\u30fc\u3092\u8ffd\u52a0\u3057\u307e\u3059<\/p>\n\n\n<pre><span style=\"color:#0000ff\">$ sudo vi \/etc\/pam.d\/sudo<\/span>\nsession    required   pam_env.so readenv=1 user_readenv=0\nsession    required   pam_env.so readenv=1 envfile=\/etc\/default\/locale user_readenv=0\n\n<span style=\"color:#ff0000\">auth            sufficient      pam_u2f.so      cue<\/span>\n\n@include common-auth\n#auth    sufficient    pam_u2f.so authfile=\/home\/gusachan\/.config\/Yubico\/u2f_keys\n@include common-account\n@include common-session-noninteractive<\/pre>\n\n\n<p>\u3059\u308b\u3068\u3001 sudo \u30b3\u30de\u30f3\u30c9\u3067Yubikey\u8a8d\u8a3c\u304c\u6c42\u3081\u3089\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"639\" height=\"82\" src=\"https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2024\/07\/yubikey_auth.png\" alt=\"\" class=\"wp-image-12077\" srcset=\"https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2024\/07\/yubikey_auth.png 639w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2024\/07\/yubikey_auth-300x38.png 300w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2024\/07\/yubikey_auth-24x3.png 24w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2024\/07\/yubikey_auth-36x5.png 36w, https:\/\/www.stuffy.site\/computers\/wp-content\/uploads\/2024\/07\/yubikey_auth-48x6.png 48w\" sizes=\"auto, (max-width: 639px) 100vw, 639px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-right\">.<\/p>\n\n\n\n<p>\u65b0\u3057\u3044\u30c7\u30d0\u30a4\u30b9\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308b\u3068\u51fa\u6765\u308b\u3053\u3068\u304c\u5e83\u304c\u3063\u3066\u697d\u3057\u307f\u304c\u5897\u3048\u307e\u3059\u306d\u3002\u305c\u3072\u3001\u304a\u4f7f\u3044\u306e\u30c7\u30d0\u30a4\u30b9\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3092\u9ad8\u3081\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002\u305d\u308c\u3067\u306f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>VMWare ESXi6.7\u30672\u6bb5\u968e\u8a8d\u8a3c\u304c\u3067\u304d\u308b\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30ad\u30fc\u300cYubikey\u300d\u3092\u4f7f\u3063\u3066Ubuntu\u306e\u7279\u6a29\u30e6\u30fc\u30b6\u30fc\u306b\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u8a8d\u8a3c\u3092\u3057\u3066\u307f\u305f\u3044\u3068Google\u5148\u751f\u306b\u8a0a\u3044\u305f\u3068\u3053\u308d\u3001\u307b\u307c\u601d\u3044\u901a\u308a\u306e\u8a2d\u5b9a\u304c\u3067\u304d\u305f\u306e\u3067\u3081\u3082\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[113,83],"tags":[],"class_list":["post-12030","post","type-post","status-publish","format-standard","hentry","category-ubuntu","category-yubikey"],"_links":{"self":[{"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/posts\/12030","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/comments?post=12030"}],"version-history":[{"count":5,"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/posts\/12030\/revisions"}],"predecessor-version":[{"id":12078,"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/posts\/12030\/revisions\/12078"}],"wp:attachment":[{"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/media?parent=12030"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/categories?post=12030"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stuffy.site\/computers\/wp-json\/wp\/v2\/tags?post=12030"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}