

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 在 Linux 主機上設定 WebAuthn 重新導向
<a name="webauth-linux"></a>

DCV Linux 伺服器目前支援標準 WebAuthn。標準 WebAuthn 需要瀏覽器擴充功能，才能將 WebAuthn 提示重新導向至用戶端。您可以使用 webauthn-redirection 許可啟用或停用 WebAuthn。如需詳細資訊，請參閱[使用許可檔案](https://docs.aws.amazon.com/dcv/latest/adminguide/security-authorization-file-create.html)。

**先決條件**
+ DCV 伺服器 2025.0 版或更新版本
+ Windows、Linux 和 Mac 的 DCV 原生用戶端
+ Linux 伺服器執行個體上的根存取 (sudo)
+ 網際網路存取以下載瀏覽器擴充功能

## 設定 WebAuthn 重新導向
<a name="configuring-webauth-linux"></a>

預設會在 DCV 上啟用 WebAuthn。您可以在 DCV 組態檔案中啟用「【webauthn】」設定來啟用或停用 WebAuthn：

```
/etc/dcv/dcv.conf

[webauthn] 
enabled=true
```

**設定 Linux 的 Webauthn**

1. 為每個支援的瀏覽器建立原生傳訊主機資訊清單檔案的符號連結。

------
#### [ Google Chrome ]

   使用下列命令：

   ```
   sudo mkdir -p /etc/opt/chrome/native-messaging-hosts
   ```

   ```
   sudo ln -s -f /usr/share/dcv/webauthn/com.dcv.webauthnredirection.nativemessagehost.json /etc/opt/chrome/native-messaging-hosts/
   ```

------
#### [ Chromium ]

   使用下列命令：

   ```
   sudo mkdir -p /etc/chromium/native-messaging-hosts
   ```

   ```
   sudo ln -s -f /usr/share/dcv/webauthn/com.dcv.webauthnredirection.nativemessagehost.json /etc/chromium/native-messaging-hosts/
   ```

------
#### [ Microsoft Edge ]

   使用下列命令：

   ```
   sudo mkdir -p /etc/opt/edge/native-messaging-hosts
   ```

   ```
   sudo ln -s -f /usr/share/dcv/webauthn/com.dcv.webauthnredirection.nativemessagehost.json /etc/opt/edge/native-messaging-hosts/
   ```

------

1. 安裝 WebAuthn 重新導向的瀏覽器延伸模組。這可以手動或透過企業政策來完成。

------
#### [ Google Chrome ]

   使用下列命令：

   ```
   sudo mkdir -p /usr/share/google-chrome/extensions/
   ```

   ```
   echo '{"external_update_url": "https://clients2.google.com/service/update2/crx"}' | \
   ```

   ```
   sudo tee /usr/share/google-chrome/extensions/mmiioagbgnbojdbcjoddlefhmcocfpmn.json
   ```

   ```
   sudo chmod a+r /usr/share/google-chrome/extensions/mmiioagbgnbojdbcjoddlefhmcocfpmn.json
   ```

------
#### [ Chromium ]

   使用下列命令：

   ```
   sudo mkdir -p /usr/share/chromium/extensions/
   ```

   ```
   echo '{"external_update_url": "https://clients2.google.com/service/update2/crx"}' | \
   ```

   ```
   sudo tee /usr/share/chromium/extensions/mmiioagbgnbojdbcjoddlefhmcocfpmn.json
   ```

   ```
   sudo chmod a+r /usr/share/chromium/extensions/mmiioagbgnbojdbcjoddlefhmcocfpmn.json
   ```

------
#### [ Microsoft Edge ]

   使用下列命令：

   ```
   sudo mkdir -p /usr/share/microsoft-edge/extensions/
   ```

   ```
   echo '{"external_update_url": "https://edge.microsoft.com/extensionwebstorebase/v1/crx"}' | \
   ```

   ```
   sudo tee /usr/share/microsoft-edge/extensions/ihejeaahjpbegmaaegiikmlphghlfmeh.json
   ```

   ```
   sudo chmod a+r /usr/share/microsoft-edge/extensions/ihejeaahjpbegmaaegiikmlphghlfmeh.json
   ```

------

1. 重新啟動瀏覽器。