Remote Desktop is a software in Windows that allows you to connect to a computer that is not close by. When you try to connect to a remote computer by using Remote Desktop, you may receive the following error message:
Remote desktop can’t connect to the remote computer. The connection was rejected by the remote computer.
- Remote access to the server is not enabled
- The remote computer is turned off
- The remote computer is not available on the network
Make sure the remote computer is turned on and connected to the network, and that remote access is enabled.
There can be multiple reasons, including permission, network, group policy, and more. One of the common reasons when your account does not have enough permission. At times the computer is not able to initiate the connection from the source computer. This post will guide you on how you can fix the problem.
Remote desktop can’t connect to the remote computer
Follow these suggestions one after the other, and check if the issue reappears.
- Check the status of the RDP protocol on a remote computer
- Check whether a Group Policy Object (GPO) is blocking RDP on a local computer
- Check the status of the RDP services
- Check that another application isn’t trying to use the same port
- Check whether a firewall is blocking the RDP port
- Check the RDP listener port
- Check the status of the RDP listener
You will need admin privilege for some of these.
1] Check the status of the RDP protocol on a remote computer
RDP Protocol has a registry entry that allows you to enable RDP Protocol which is important for the Remote Desktop app to make a connection. Do make sure to take a backup of the registry before making any change.
Type Regedit in the Run prompt (Win +R), and press the Enter key. Then navigate to the following path.
Double click on the DWORD fDenyTSConnections and change the value to 0 to enable RDP.
2] Check whether a Group Policy Object (GPO) is blocking RDP on a local computer
Open Group Policy Editor and navigate to the following path
Computer Configuration\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Connections
Find the policy with name— Allow users to connect remotely by using Remote Desktop Services. Please set it to Enabled.
On the affected computers, open a command prompt window as an administrator, and run the
gpupdate /force command.
Related: Remote Desktop can’t find the computer.
3] Check the status of the RDP services
Services related to RDP should be running on both client and remote computers. The primary services are—
- Remote Desktop Services (TermService) and
- Remote Desktop Services UserMode Port Redirector (UmRdpService).
Type services in the Run prompt followed by the Enter key.
In the services panel, locate both of these services, and make sure they are running. Set them to restart along with the computer automatically.
4] Check that another application isn’t trying to use the same port
RDP uses port no 3389, and if any other application is using it, you will not be able to connect.
Run the following command on elevated PowerShell
cmd /c netstat -ano
Locate anything which has a reference of 3389, and then notice the PID of the process.
Open Task Manager, and right-click on any of the columns to select PID. Locate the process which has the same PID which we found using the command.
If its anything other than Remote Desktop, then you have the following options:
- Change the port of Remote Desktop.
- Uninstall or Disable the application using that port
- Change the port used by the application to something else.
Make sure to restart RDP services once done.
Related: Remote Desktop Connection not working in Windows 10.
5] Check whether a firewall is blocking the RDP port
Sysinternals offer a PS Ping Tool to check if you can reach a com[puter through a port. It is also used to check a list of open ports on any computer.
- Download the PSPING tool from Sysinternals.
- Open the command prompt
- Then navigate to the folder where you downloaded the file.
- Execute the following command
psping -accepteula <computer IP>:3389
If the result says that the remote computer has refused connection or all attempts to connect failed, then you need to check if the port has been blocked at the computer.
Follow our exhaustive guide to check port restrictions on the Firewall to remove any firewall.
6] Check the RDP listener port
RDP uses Port number 3389, and if the connection is not getting established, make sure to check they are configured correctly on both the computer. Here we will modify the registry, so make sure to take a backup.
- Type regedit in the Run prompt, and then press the Enter key.
- Navigate to the following path
- Locate PortNumber (DWORD), and double click and make sure the value is 3389
- Restart Remote Desktop services.
- Check if you can connect to the remote computer.
Make sure to follow the same steps on both computers.
Troubleshoot: Remote Desktop connection issues on Windows.
7] Update with another computer registry
If you have another computer to or from which you can connect using a remote connection, you can choose to export registry keys of the RDP and import where it is not working.
Follow this on which the remote connection is working:
Open Registry editor, and navigate to the following path:
Right-click on RDP-Tcp keys and choose to export. It will carry all the settings inside the key.
Follow this on which the remote connection is not working:
- Copy the exported file from the above method, and keep it on the desktop.
- Next, open the Registry editor, and click on File > Import
- Select the exported file
- You will be prompted about the merger or overwrite, approve it.
Having done that, check if you are able to connect through the remote desktop app.
I hope you were able to resolve the Remote desktop can’t connect to the remote computer problem. Make sure to always back up the computer and the registry before making any change.