How to remove annoying certificate warning for RDP



Hi Habr, this is a super short and simple guide for beginners on how to connect via RDP by domain name so that an annoying warning about a certificate signed by the server does not come out. We need WinAcme and a domain.



Everyone who has ever used RDP has seen this inscription.





The manual contains ready-made commands for added convenience. Copied, pasted and earned.



So, this window can in principle be skipped if you issue a certificate signed by a third-party, trust certification authority. In this case, Let's Encrypt.



1. Add A record







Just add an A record and enter the server's IP address into it. The work with the domain is over.



2. Download WinAcme



Download WinAcme from their website . It is best to unpack the archive where you cannot get, executable files and scripts will be useful to you in the future for automatic certificate renewal. It is best to shake out the archive in C: \ WinAcme \.



3. Open port 80







Your server is authorized via http, so we need to open port 80. To do this, enter the command in Powershell:



New-NetFirewallRule -DisplayName 80-TCP-IN -Direction Inbound -Protocol TCP -Enabled True -LocalPort 80


4. Allow execution of scripts



In order for WinAcme to be able to import the new certificate without problems, you need to enable script execution. To do this, go to the / Scripts / folder.







Before launching WinAcme, we need to allow the execution of two scripts. To do this, double-click PSRDSCerts.bat from the scripts folder.



5. Install the certificate







Next, copy the line below and enter the domain name by which you want to connect to the server and run the command.



C:\Winacme\wacs.exe --target manual --host VASHDOMAIN.RU --certificatestore My --installation script --installationsiteid 1 --script "Scripts\ImportRDListener.ps1" --scriptparameters "{CertThumbprint}"


After that, the certificate of the signing domain will be replaced by the old one. You do not need to update anything manually, after 60 days the program will renew the certificate itself.



Done! You are great and got rid of the annoying mistake.



What system errors annoy you?






All Articles