Невозможно подключиться по RDP к некоторым серверам Windows – Код ошибки: 0x904
У нас начались проблемы при попытке подключиться по RDP к нескольким нашим серверам Windows разных версий (2022, 2019 и 2016). Мы получаем всплывающее окно со следующими деталями:
Этот компьютер не может подключиться к удаленному компьютеру.
Попробуйте подключиться еще раз. Если проблема не исчезнет, обратитесь к владельцу удаленного компьютера или к вашему сетевому администратору.
Код ошибки: 0x904
Расширенный код ошибки: 0x7
Метка времени (UTC): 24.04.25 14:28:33
|
1 2 3 4 5 6 |
net stop termservice :: Удалить старый сертификат RDP reg delete "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM" /v "Certificate" /f reg delete "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM" /v "X509 Certificate" /f reg delete "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM" /v "X509 Certificate ID" /f net start termservice |
The following events could cause this issue:
- The RDP self-signed certificate has expired or is missing (Windows® usually recreates the self-signed certificate upon expiration.
- Permissions issues on the following path:
C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys\f686aace6942fb7f7ceb231212eef4a4.
The parent folder did not allow the OS to delete the existing key, which needs to happen before self-signed certificate recreation.
Use the following steps to resolve this issue:
1)Delete the expired certificate from the Centralized Certificate Store (CCS) on the server by using the Certificates snap-in in the Microsoft Management Console (MMC).
|
1 |
Select Certificates > Remote Desktop > Certificates. |
2)Stop the RDP service.
|
1 |
Stop-Service -Name TermService -Force |
3)Go to path
C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys,
take ownership of the f686 key file, referenced previously, and give the owner of the file Full Control permission.
4)Change the Administrators group permission for the MachineKeys folder to apply to “This folder, subfolders and files.
5)Delete file: f686aace6942fb7f7ceb231212eef4a4.
6)Start the Remote Desktop Services service.
|
1 |
Start-Service -Name TermService |
7)Verify that the system generated a new certificate by using the Certificates snap-in in MMC.
8)Verify RDP access to the server.