Skip to content

Instantly share code, notes, and snippets.

@hdml
Created April 19, 2017 21:24
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hdml/20aeae3d2e95bc9a16f9a2d569258b91 to your computer and use it in GitHub Desktop.
Save hdml/20aeae3d2e95bc9a16f9a2d569258b91 to your computer and use it in GitHub Desktop.
Custom SSL Certificate for Windows RDP Service

##Custom SSL Certificate for Windows RDP Service

Requirements

  • Windows 8+ or Server 2012+
  • Certificate with private key (*.p12)
  • Intermediate CA certificate (*.cer)
  • Administrative rights to modify the certificate store

If you're in Windows Server 2012 R2, use Microsoft's Easy Fix.

###Install the intermediate certificate

  1. Install your intermediate certificates by double clicking your *.cer file, store it in Local Machine.
  2. When prompted to select a store, store it in Intermediate Certification Authorities.

###Install the local certificate

  1. Install your intermediate certificates by double clicking your *.p12 file, store it in Local Machine.
  2. When prompted to select a store, store it in Personal.
  3. Open mmc.exe, add the Certificates snap-in. When prompted, select Computer account.
  4. Go to Personal, right click your certificate and select All Tasks > Manage Private Keys.
  5. Add Network Service so the RDP service can read your private key.
  6. Double click your certificate. Go to the Details tab, select Thumbprint from the dropdown menu and copy the values, we'll need them next.

###Configure RDP Service to use new certificate

  1. Edit rdp_cert.reg
  2. Change the values after hex: to match your thumbprint. You can use the replace function to replace spaces with commas.
  3. Double click rdp_cert.reg to apply it
  4. Restart Terminal Services service or reboot the computer.

Done.

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp]
"SSLCertificateSHA1Hash"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment