Cannot connect to a server with Remote Desktop (RDP): causes and fixes

When RDP fails, the cause is usually a stopped server, port 3389 blocked, the Remote Desktop service stopped, or wrong login details. Check them in this order.

Last updated:

Step 1: can your computer reach port 3389?

Run this in PowerShell on your computer. If TcpTestSucceeded is True the network is fine and the problem is the login or the service. If it is False, the problem is the server, a firewall or your network.

powershell
$ Test-NetConnection SERVER_IP -Port 3389

Step 2: open the server console

The console works without RDP and shows what is really happening: Windows may be installing updates or waiting for a restart. Log in there and continue.

Step 3: make sure Remote Desktop is on and running

Run these in PowerShell inside the server as administrator. The first turns the feature on, the second allows it through Windows Firewall, and the third restarts the service.

powershell
$ Set-ItemProperty 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -Name fDenyTSConnections -Value 0
$ Enable-NetFirewallRule -Name 'RemoteDesktop-UserMode-In-TCP'
$ Restart-Service TermService -Force

Step 4: check the firewall in the provider's panel

The panel's firewall is separate from Windows Firewall. It must allow inbound TCP on port 3389. If you changed the RDP port, write it after the address, such as SERVER_IP:3390.

Common errors and what to do

"Your credentials did not work": type the username as you received it, and try .\Administrator so Windows does not look in another domain.

"An internal error has occurred" or code 0x204: restart the service as in step 3 and try another network, since this message often comes with a network drop or a stopped service.

A CredSSP or "encryption oracle remediation" error: your computer and the server are out of step on updates. Update Windows on both.

"Stuck on Please wait": usually updates or a hung session. Wait a few minutes, and if it continues restart the server from the panel.

Was this page helpful?