Computer >> Hướng Dẫn Máy Tính >  >> Hệ Thống >> Windows 7

Khắc Phục Lỗi RDP: "An Authentication Error Has Occurred - The Function Requested Is Not Supported"

Sau khi cài bản cập nhật bảo mật mới nhất trên Windows 10 desktop, không thể kết nối Remote Desktop đến VDS server mới (Windows Server 2012 R2). Khi nhập tên server RDP trong mstsc.exe và bấm "Connect", lỗi xuất hiện:

Remote Desktop Connection
An authentication error has occurred.
The function requested is not supported.
Remote computer: computer_name

Khắc Phục Lỗi RDP:  An Authentication Error Has Occurred - The Function Requested Is Not Supported

Sau khi gỡ bản cập nhật mới và reboot, kết nối RDP lại bình thường. Nhưng đây chỉ là giải pháp tạm. Gói cập nhật tích lũy mới sẽ đến tháng sau và lỗi sẽ tái diễn. Cần giải pháp dứt điểm.

Giải Thích Nguyên Nhân

Bạn hoàn toàn đúng. Gỡ bản cập nhật Windows để giải quyết vấn đề là không đúng, vì làm lộ máy tính trước các lỗ hổng bảo mật mà bản cập nhật đó vá. Lỗi RDP "An authentication error has occurred" cũng có thể xuất hiện khi chạy RemoteApp.

Tại sao lại xảy ra? Máy Windows 10 desktop của bạn đã cài các bản cập nhật bảo mật (phát hành sau tháng 5/2018) vá lỗ hổng nghiêm trọng trong giao thức CredSSP (Credential Security Support Provider) dùng cho xác thực trên RDP server (CVE-2018-0886 — xem chi tiết bài "RDP authentication error: CredSSP Encryption Oracle Remediation"). Các bản cập nhật này chưa được cài trên phía RDP/RDS server, và NLA (Network Level Authentication) được bật cho truy cập Remote Desktop. NLA dùng cơ chế CredSSP để pre-authenticate user RDP qua TLS/SSL hoặc Kerberos. Máy của bạn đơn giản chặn kết nối RDP đến server dùng phiên bản CredSSP dễ bị tổn thương.

Giải Pháp

  1. Cách đúng đắn nhất: Cài bản cập nhật bảo mật tích lũy mới nhất lên máy tính từ xa hoặc RDS server (máy bạn đang cố gắng kết nối RDP);
  2. Workaround 1: Tắt NLA (Network Level Authentication) phía RDP server (hướng dẫn dưới);
  3. Workaround 2: Cấu hình lại desktop cho phép kết nối RDP với phiên bản CredSSP không an toàn. Thay đổi tham số registry AllowEncryptionOracle (lệnh: REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters /v AllowEncryptionOracle /t REG_DWORD /d 2) hoặc đổi Local Policy Encryption Oracle Remediation thành Vulnerable. Đây là cách duy nhất truy cập RDP server nếu không thể đăng nhập local (qua ILO, VM console, web interface cloud provider). Kết nối được thì cài cập nhật bảo mật cho server. Sau khi cập nhật xong, nhớ tắt policy hoặc đặt lại AllowEncryptionOracle = 0 (REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters /v AllowEncryptionOracle /t REG_DWORD /d 0).

Tắt NLA Cho Remote Desktop Trên Windows

Nếu NLA bật trên RDP server, nghĩa là CredSSP dùng cho pre-authenticate user RDP. Tắt Network Level Authentication trong System Properties tab Remote bằng cách bỏ tích "Allow connection only from computers running Remote Desktop with Network Level Authentication (recommended)" (Windows 10/8.1 hoặc Windows Server 2012R2/2016).

Khắc Phục Lỗi RDP:  An Authentication Error Has Occurred - The Function Requested Is Not Supported

Trên Windows 7 (Windows Server 2008 R2), tùy chọn tên khác. Tab Remote, chọn "Allow connections from computers running any version of Remote Desktop (less secure)".

Khắc Phục Lỗi RDP:  An Authentication Error Has Occurred - The Function Requested Is Not Supported

Cũng có thể tắt NLA qua Local Group Policy Editor — gpedit.msc (chạy gpedit.msc trên Windows 10 Home như hướng dẫn) hoặc Domain GPO — GPMC.msc. Trong policy editor: Computer Configuration → Administrative Templates → Windows Components → Remote Desktop Services → Remote Desktop Session Host → Security, tìm và Disable policy "Require user authentication for remote connections by using Network Level Authentication".

Khắc Phục Lỗi RDP:  An Authentication Error Has Occurred - The Function Requested Is Not Supported

Cần chọn RDP Security Layer trong policy "Require use of specific security layer for remote (RDP) connections".

Để áp dụng cài đặt RDP mới, cập nhật group policy local (gpupdate /force) hoặc reboot máy. Sau đó sẽ kết nối Remote Desktop thành công.