By Ellie / Last Updated November 3, 2021

The issue: Because of a security error on RDP

“I’m the IT Manager for a firm with five offices, and we usually use Remote Desktop to connect to our office servers. Recently, I have had a computer having an issue getting into one server. When I type in the IP address and user name and try to connect, I get the error message: ‘Because of a security error, the client could not connect to the remote computer.’ Any thoughts on what could cause this? Thanks for your time.”

RDP Security Error

Three confirmed solutions to fix Because of a security error

Because of a security error on RDP is a typical Remote Desktop Connection problem. Here in this post, we provide you with three solutions to this issue.

Solution 1. Disable the firewall rules

The main function of the Windows Defender Firewall is to manage incoming and outgoing connection requests. In some cases, it may block RDP connection requests. Therefore, we need to disable it to fix the problem.

Step 1. Press Win + R and then type in “control panel” and hit OK to open Control Panel.

Run Box Control Panel

Step 2. Navigate here: Control Panel > System and Security > Windows Defender Firewall.

Defender Firewall

Step 3. Click Turn Windows Defender Firewall on or off in the left sidebar.

Turn Off Windows Defender Firewall

Step 4. Select Turn off Windows Defender Firewall under the Private network settings, and select Turn off Windows Defender Firewall under the Public network settings.

Change Network Settings Firewall

Step 5. Then go back to the Windows Defender Firewall page, find and click Advanced settings.

Firewall Advanced Settings

Step 6. Click Inbound Rules, right-click the items related to Remote Desktop and select Disable Rule in the expanded menu. After this, try the remote connection again.

Disable Remote Desktop Rules

Solution 2. Delete Registry values

This “Because of a security error on RDP” issue may occur if a certificate on the Remote Desktop server is corrupted. To solve the problem, you can delete the corrupted or misplaced certificate.

Step 1. Press Win + R to invoke the Run dialog box and then type in “regedit” and hit OK to open Registry Editor.

Run Box Regedit

Step 2. Navigate here: Computer > HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > Terminal Server > RCM.


Step 3. Click File and then Export to export the Registry File, type exported-Certificate in the File name box, and then click Save.

Export File

Step 4. On the right pane of the RCM, right-click each of the following values, click Delete, and then click Yes to verify the deletion:

  • Certificate
  • X509 Certificate
  • X509 Certificate ID
  • X509 Certificate2

Step 5. Quit Registry Editor, and then restart the Remote Desktop.

Solution 3. Configure authentication and encryption 

You can also try to resolve the issue by configuring authentication and encryption.

Step 1. Press Win Key + R, then type in “gpedit.msc” and press OK to open the Local Group Policy Editor window.

Local Group Policy Editor Window

Step 2. Navigate here: Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Security. 

Remote Desktop Session Host Security

Step 3. Find and click Set client connection encryption level, Require use of specific security layer for remote connections and Require user authentication for the remote connection by using Network Level Authentication. Change their status to Enabled respectively.

Enable Encryption Level

Enable RDP Security Layer

Enable User Authentication

Remote control without security error: AnyViewer

If you still can’t solve the “Because of a security error on RDP” issue after trying the above three solutions, here we recommend you a remote control solution without security error, AnyViewer. It is a free remote control utility, especially for Windows and Windows Servers.

It provides you with two easy ways to achieve remote connection. One is to send a control request, and another is to input a security code. Next, we’ll introduce the two connection methods in detail.

Download Freeware Win 11/10/8.1/8/7/XP
Secure Download

Methods 1. Send a control request

Step 1. Download, install, and open AnyViewer on both devices. Then you can see your device ID.

Temporary Code

Step 2. Ask for the device ID of the recipient, input it and then click Connect. Then click Send a control request to your partner.

Send a Control Request to Your Partner

Step 3. Then recipient will receive a request on the lower-right corner of their screen. Click the green button to make the connection successful.

Request to Control Your Device

Methods 2. Input security code

Step 1. You can see your temporary security code on the main interface.

Copy the Temporary Security Code

Step 2. Go to Settings > Recipient. Tick the third option and then set the permanent security code.  

Accept Remote Control

Step 3. The controller needs to input the device ID of the recipient and then click Connect.


Step 4. Choose Input a security code and click OK (you can input either the permanent security code or the temporary security code of the recipient).

Security Code

As you can see, the whole connection process with AnyViewer is pretty easier. You won’t encounter any security error anymore.