What "Remote Desktop can't connect to the remote computer" means
This is the message Remote Desktop Connection (mstsc) shows when it cannot open a working session to the server. It names a few generic reasons (remote access not enabled, the computer switched off, the computer not on the network) but not which one applies. Microsoft's own troubleshooting article starts the same way: when the client gives no useful detail, you check the RDP protocol status, the services, the listener, the port and then the firewall, in that order.
The fastest way to narrow it down is to ask one question first: can a plain TCP connection reach the RDP port at all? Everything else follows from the answer. RDP listens on port 3389 by default, and IANA registers 3389 for TCP and UDP under the service name ms-wbt-server, which is the name some firewalls and port scanners show instead of "RDP".
Quick diagnosis: match the symptom to the cause
| What you see | Most likely cause | First check |
|---|---|---|
| "Can't connect to the remote computer" and the port test times out | Firewall (Windows Firewall, the provider's firewall or your own network), wrong IP, or the server is off | Port test from a second network; server status and firewall rules in the control panel |
| Port test is refused straight away | The server is up but nothing listens on that port: RDP disabled, listener broken, or RDP moved to another port | qwinsta and netstat from the console |
| "An internal error has occurred" | Security negotiation, or a broken Remote Desktop self-signed certificate | Connect to localhost from the console; then the certificate checks below |
| "An authentication error has occurred... This could be due to CredSSP encryption oracle remediation" | Client and server disagree on CredSSP patch level or policy | Windows Update on both sides; the Encryption Oracle Remediation policy |
| Worked until you changed the RDP port | Firewall rule missing for the new port, or the client still uses 3389 | Connect as ip:newport; check the inbound rule |
| Works from home, fails from the office (or the other way round) | A network between you and the server blocks the port | Run the port test from both places |
Step 1: test whether port 3389 is reachable
Run a TCP test from the computer that fails to connect. Replace 203.0.113.10 with your server's public IP.
From Windows (PowerShell)
Test-NetConnection -ComputerName 203.0.113.10 -Port 3389
Look at the last line. TcpTestSucceeded : True means the network path is open and the problem is on the RDP side (Step 3 onwards). False means the connection never completed, so look at the server state and firewalls first. Microsoft's article also suggests the Sysinternals psping tool for the same test (psping -accepteula 203.0.113.10:3389), run from more than one computer, so you can tell whether the server blocks everyone or only one network.
From Ubuntu 24.04 or 22.04
# if the nc command is missing, install it:
sudo apt install netcat-openbsd
nc -vz -w 5 203.0.113.10 3389
-z tells nc to check for a listening service without sending data, -v prints the result and -w 5 gives up after five seconds. "succeeded" means the port is open; "Connection refused" means the server answered but nothing is listening; no answer before the timeout usually means a firewall is dropping the traffic or the address is wrong.
Step 2: if the test times out, check the server and the firewalls
- Is the server running? Check its status in your control panel. A server that is stopped, rebooting or installing updates will not answer.
- Is it the right IP? Copy it again from the panel. A server that was rebuilt or moved can have a new address.
- Does the provider's firewall allow the port? Many VPS platforms have a firewall in front of the server, separate from Windows Firewall. It needs an inbound rule for TCP 3389, or for your custom port, from your IP.
- Does Windows Firewall allow it? From the console, run the check in Step 3.
- Is your own network blocking it? Some office, college and public Wi-Fi networks block outbound RDP. Try the port test from a phone hotspot. If it succeeds there, the block is on your side, not the server's.
Step 3: check Remote Desktop from inside the server
If you cannot reach the server over RDP, sign in through the console instead and open PowerShell as Administrator. These checks follow Microsoft's general troubleshooting article.
Is Remote Desktop enabled?
reg query "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections
0x0 means RDP is enabled; 0x1 means it is disabled. To enable it and open the built-in firewall rules:
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server' -Name fDenyTSConnections -Value 0
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
If the value flips back to 1, a Group Policy is overriding it. Run gpresult /H C:\gpresult.html, open the report, and look for Allow users to connect remotely by using Remote Desktop Services under Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections. If it is Disabled, the report names the winning policy.
Are the services running?
Get-Service TermService, UmRdpService
Start-Service TermService
Microsoft lists two services that must run: Remote Desktop Services (TermService) and Remote Desktop Services UserMode Port Redirector (UmRdpService).
Is the listener up, and on which port?
qwinsta
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name PortNumber
cmd /c 'netstat -ano | find "3389"'
qwinsta should list rdp-tcp with the state Listen. PortNumber shows the port RDP is configured for; if it is not 3389, someone moved it and you must connect to ip:port. netstat should show a LISTENING line for that port. If another program holds the port, find it with cmd /c 'tasklist /svc | find "<pid>"', using the PID from the netstat line, and move that program to a different port.
If qwinsta shows no rdp-tcp listener at all, Microsoft's fix is to export the RDP-Tcp registry key from a healthy server on the same Windows version and import it, then restart TermService. Back up the existing key first with reg export.
Does Windows Firewall let it in?
Get-NetFirewallRule -DisplayGroup "Remote Desktop" | Select-Object DisplayName, Enabled, Profile
Get-NetFirewallRule -DisplayGroup "Remote Desktop" | Get-NetFirewallAddressFilter
The rules should be enabled for the profile the server's network uses. The second command shows the allowed remote addresses. If you restricted RDP to your office IP and that IP changed, this is why you are locked out: add your new address from the console.
"An internal error has occurred"
This error can appear before or after you type your password. Microsoft's article for it gives a clean first test: on the server itself (through the console), run mstsc and connect to localhost.
- Localhost works: the server's RDP stack is fine and the problem is on the network path between you and the server.
- Localhost fails too: the problem is on the server, usually in security negotiation or the Remote Desktop certificate.
To confirm it is negotiation, Microsoft's article sets two policy values to 0 temporarily, tests, then restores the recommended values. Do this only as a short test and only from the console, because it turns off Network Level Authentication while it is in place:
# temporary test only
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v SecurityLayer /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v UserAuthentication /t REG_DWORD /d 0 /f
# put the recommended values back when you finish
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v SecurityLayer /t REG_DWORD /d 2 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v UserAuthentication /t REG_DWORD /d 1 /f
If the connection works with the test values, the cause is likely the self-signed certificate or the protocol negotiation. Open certlm.msc, go to Remote Desktop > Certificates, delete the RDP self-signed certificate and restart the Remote Desktop Services service. Windows should create a new one. If it does not, Microsoft points to these certificate checks:
- The services
CertPropSvc,KeyIso,CryptSvcandSessionEnvmust be running, because they create the certificate. - The folder
C:\ProgramData\Microsoft\Crypto\RSA\MachineKeysmust give Administrators full control and Everyone read and write.
If the certificate is re-created but the error stays, Microsoft treats it as a protocol negotiation problem and lists these checks:
- Under
HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp, aSSLCertificateSHA1HashValuethat does not match the current certificate's thumbprint should be deleted and the server restarted (not on a server with the Connection Broker role),fAllowSecProtocolNegotiationshould be 1 andMinEncryptionLevelshould be 3. - If the SSL Cipher Suite Order Group Policy is configured, Microsoft says to set it to Not configured.
Microsoft also notes one odd case: if the connection hangs for about a minute, shows the error, then works on the second try, the Windows Audio service on the server can be the cause.
CredSSP encryption oracle remediation
The full message reads "An authentication error has occurred. The function requested is not supported", followed by "This could be due to CredSSP encryption oracle remediation". It comes from CVE-2018-0886, a remote code execution flaw in CredSSP, the protocol RDP uses to pass your credentials to the server. Microsoft patched it in 2018 and added a policy, Encryption Oracle Remediation, that controls whether patched and unpatched machines may still talk.
| Value | Setting | What it does |
|---|---|---|
| 0 | Force updated clients | Clients cannot fall back to the insecure version; the server refuses unpatched clients |
| 1 | Mitigated | Clients cannot fall back; the server still accepts unpatched clients. Default since the May 2018 update |
| 2 | Vulnerable | Clients may fall back to the insecure version, which exposes servers to attack |
The error appears when one side is patched and set to refuse the other. Microsoft's compatibility table blocks two cases: an unpatched client connecting to a server set to Force updated clients, and a patched client (Force updated or Mitigated) connecting to an unpatched server.
The real fix is to install Windows updates on both the client and the server. If the server is the unpatched side, you cannot RDP in to update it, so use the console, run Windows Update, and reboot.
Microsoft's articles also show a temporary workaround on the client: set the policy to Vulnerable in gpedit.msc under Computer Configuration > Administrative Templates > System > Credentials Delegation > Encryption Oracle Remediation, or with the registry:
REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters /v AllowEncryptionOracle /t REG_DWORD /d 2
Treat that as a one-time bridge to reach and patch the server, not a setting to keep. Any change to this policy needs a reboot. When the server is updated, delete the value or set it back to 1.
Connecting from Ubuntu 24.04 or 22.04
On Ubuntu desktops, FreeRDP gives you a command-line RDP client whose log output shows where a connection fails. Ubuntu 24.04 ships FreeRDP 3 as the freerdp3-x11 package with the xfreerdp3 command; Ubuntu 22.04 has FreeRDP 2 as freerdp2-x11 with xfreerdp.
# Ubuntu 24.04
sudo apt install freerdp3-x11
xfreerdp3 /v:203.0.113.10 /u:Administrator /cert:tofu
# Ubuntu 22.04
sudo apt install freerdp2-x11
xfreerdp /v:203.0.113.10 /u:Administrator /cert:tofu
# custom port
xfreerdp3 /v:203.0.113.10:50389 /u:Administrator /cert:tofu
/cert:tofu accepts the server's certificate on the first connection and refuses later connections if it changes, which is safer than /cert:ignore. If the connection fails, add /log-level:DEBUG to xfreerdp3 to see which stage (TCP, TLS, NLA) breaks. A failure at the TCP stage takes you back to Step 1.
Locked out after changing the RDP port
Microsoft's method for a custom port is a registry change plus a firewall rule for the new port. The order matters: add the firewall rule first, then change the port, then restart. From the console, a recovery looks like this:
$port = 50389
New-NetFirewallRule -DisplayName 'RDP-Custom-TCP-In' -Direction Inbound -Action Allow -Protocol TCP -LocalPort $port
New-NetFirewallRule -DisplayName 'RDP-Custom-UDP-In' -Direction Inbound -Action Allow -Protocol UDP -LocalPort $port
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name PortNumber -Value $port
Restart-Computer
Then connect to 203.0.113.10:50389, and remember the provider's firewall needs the new port too. Moving the port cuts down log noise from scanners, but it is not a security control on its own; Microsoft's general troubleshooting article also says it does not recommend running Remote Desktop on another port. Our guide to Windows Server setup and RDP hardening covers restricting RDP to your own IP addresses, which does more for security.
Common mistakes
- Turning off NLA to "fix" a connection and leaving it off. The
SecurityLayerandUserAuthenticationtest is a diagnosis, not a fix. Restore the values the same day. - Leaving CredSSP on Vulnerable. It exists to get you to a server you need to patch. Patch it, then set the policy back.
- Locking RDP to an IP that changes. If your home or mobile connection gets a new public IP, an IP-restricted rule locks you out. Know how to reach the console before you restrict RDP.
- Changing the port before adding the firewall rule. The session drops at the restart and the new port is closed.
- Testing only from one network. A blocked port on office Wi-Fi looks the same as a server fault until you test from a hotspot.
- Forgetting the provider firewall. Opening Windows Firewall is not enough if a firewall in front of the server still drops the port.
- Deleting certificates or registry keys without a backup. Export a key with
reg exportbefore you remove it.
RDP on a Bigdomainhost Windows VPS
A Bigdomainhost Windows VPS is a KVM VPS built with Windows Server 2019 or 2022, in Mumbai (BOM-1) or Delhi NCR (DEL-1), with Administrator access over RDP. Each server has its own inbound firewall rules that you edit in the control panel, so check there that a rule allows TCP 3389 (or your custom port) from your IP, and an out-of-band console there that works without RDP, which is what you use for the checks in Step 3 when RDP will not answer. If you need dedicated cores for a busy office workload, Windows VDS plans start from ₹4,499 per 30 days plus 18% GST, with the Windows licence included.
Stuck on an RDP error on your server? Message us on WhatsApp at any time, call +91 75994 50220 during IST working hours, or email support@bigdomainhost.com.
Bigdomainhost wrote this guide with AI assistance and sells the Windows servers it describes. Steps were checked against Microsoft's troubleshooting articles, the CredSSP update notes and the Ubuntu manual pages on 28 November 2026; menu names and defaults can change between Windows versions.
Sources (checked )
- Microsoft Learn (Internet Archive copy): General Remote Desktop connection troubleshooting
- Microsoft Learn (Internet Archive copy): "An internal error has occurred" when connecting to a remote machine
- Microsoft Support: CredSSP updates for CVE-2018-0886
- Microsoft Learn (Internet Archive copy): CredSSP encryption oracle remediation error when you RDP to a Windows VM
- Microsoft Learn (Internet Archive copy): Change the listening port for Remote Desktop
- Microsoft Learn (Internet Archive copy): Test-NetConnection cmdlet reference
- IANA: Service Name and Transport Protocol Port Number Registry: port 3389
- Ubuntu manual pages: xfreerdp3(1), Ubuntu 24.04
- Ubuntu manual pages: nc(1), netcat-openbsd, Ubuntu 24.04