Common RDP errors
The connection fails
-
Remote Desktop can't connect to the remote computer for one of these reasons
Connection failed- Common cause
- The server is off or unreachable, Remote Desktop is not enabled, or a firewall blocks the port.
- First check
- Test the port from your computer with the Test-NetConnection command.
This is the general message when the connection to the server fails. On your computer, check the address, and when the server uses a port other than 3389, add it to the address. Test-NetConnection with the -Port 3389 option shows whether the port is open: True means the network is fine, and False points to a block along the way or a service that is not listening. On the server, through your server provider's console, make sure Remote Desktop is enabled, TermService is running, qwinsta shows rdp-tcp in the Listen state, and the Remote Desktop firewall rules are enabled.
-
This computer can't connect to the remote computer.
Connection or permission- Common cause
- A problem connecting to the server, or an account that is not allowed to connect over Remote Desktop.
- First check
- Whether the account is a member of the Administrators group or the Remote Desktop Users group.
Microsoft lists two main causes for this message: a problem connecting to the server, or an account that is not allowed to connect remotely. Members of the Administrators group can connect even when they are not on the list of allowed users, and a standard user must be a member of the Remote Desktop Users group. Sign in with an administrator account and add the user to the group. When an administrator account can't connect either, check the network: the port, the Remote Desktop service, and the firewall.
-
Remote Desktop can't find the computer
Server name- Common cause
- Your computer can't resolve the server name to an IP address.
- First check
- Connect to the server's IP address instead of its name.
This message appears when the Remote Desktop client can't find the server by the name you entered. Check the spelling of the name and try connecting to the server's IP address. When the connection to the IP address works, the problem is name resolution: check that the DNS record for the name points to the correct address, and that a recent record change has already reached the DNS servers.
-
An internal error has occurred.
Internal error- Common cause
- A failure negotiating encryption between your computer and the server, usually the server's Remote Desktop certificate.
- First check
- Re-create the Remote Desktop certificate on the server.
According to Microsoft, this message usually appears when the computer and the server can't negotiate the encryption settings. On the server, open certlm.msc, delete the certificate in Remote Desktop > Certificates, and restart the Remote Desktop Services service, and Windows creates a new certificate. If it is not created, make sure CertPropSvc, KeyIso, CryptSvc, and SessionEnv are running. When the connection hangs for about a minute and succeeds on the second try, Microsoft notes the cause may be audio and suggests stopping the Windows Audio service on the server.
-
Remote Desktop Service is currently busy
Service busy- Common cause
- Memory running low or sessions that are not released, usually because of third-party software.
- First check
- Connect through the console and check memory usage in Task Manager.
This message appears when the Remote Desktop service on the server can't accept a new connection. Connect through your server provider's console and check in Task Manager whether a process uses an unusual amount of memory. The recommended first step is to restart the server. Restarting only the Remote Desktop Services service disconnects connected users, but their sessions are kept and they can return to them. When the problem comes back, Microsoft recommends updating software that runs alongside RDP connections, such as security software, or removing it for testing.
-
Connecting to a different RDP port
Port 3389- Default port
- 3389
- Address with a port
- server.example.com:3390
Remote Desktop listens on port 3389 by default. When the server uses a different port, type the server name or address in the Remote Desktop client, followed by a colon and the port number, otherwise the connection fails. On the server, the port number is stored in the PortNumber registry value, and after you change it, restart the server. Before the restart, add firewall rules that allow the new port over TCP and UDP, so you keep access to the server. Microsoft recommends keeping port 3389 when there is no reason to change it.
Sign-in and permissions
-
Your credentials did not work
Credentials- Common cause
- A user name or password that the server can't verify.
- First check
- The user name in the SERVER1\Administrator format, and the keyboard layout when you type the password.
The server can't verify the user name and password. For a local account, type the server name, a backslash, and the user name, for example SERVER1\Administrator, and for a domain account, type the domain name instead of the server name. Type the password with the correct keyboard layout and Caps Lock off, and check that the password saved in the Remote Desktop client is up to date. After you change the password on the server, update the saved credentials on your computer too.
-
The Local Security Authority cannot be contacted
Expired password- Common cause
- A password that expired or must be changed at next sign-in, or a wrong server or domain name in the user name.
- First check
- The password expiration of the account on the server.
The message starts with the words An authentication error has occurred. When the server requires Network Level Authentication (NLA), you can't change an expired password while signing in, so Microsoft recommends changing it in advance, from another account. Sign in with an administrator account, set a new password for the user in lusrmgr.msc, and connect again with the new password. The message also appears when the part of the user name before the backslash, the server name or the domain name, is wrong.
-
This could be due to CredSSP encryption oracle remediation
CredSSP- Common cause
- The CredSSP security updates are installed on only one side, your computer or the server.
- First check
- Windows updates on the computer and the server, and a restart of both.
The message starts with the words An authentication error has occurred. The function requested is not supported. CredSSP handles authentication for the connection, and the security updates released for it in 2018 block connections from an updated computer to a server that is not updated. Microsoft's fix is to install the updates on both sides and restart both. You can bypass the block with the Encryption Oracle Remediation policy, but according to Microsoft the bypass allows an insecure connection, so installing the updates is the better option.
-
The system administrator has restricted the types of logon
Logon type- Common cause
- The account is not in a group allowed to connect over Remote Desktop, or a security policy blocks it.
- First check
- The user's membership in the Remote Desktop Users group.
The connection closes right after you enter the password. Add the user to the Remote Desktop Users group in lusrmgr.msc or with the Add-LocalGroupMember command. When the user is already a member, open secpol.msc and check under User Rights Assignment that the group appears in the Allow log on through Remote Desktop Services policy, and that the user does not appear in the Deny log on through Remote Desktop Services policy. After changing the policy, run gpupdate /force.
-
you need the right to sign in through Remote Desktop Services
Sign-in right- Common cause
- The account does not have the right to sign in through Remote Desktop Services.
- First check
- The Allow log on through Remote Desktop Services policy in secpol.msc.
The full message starts with the words To sign in remotely. It appears when the account does not belong to a group that was granted the right to sign in remotely, and according to Microsoft it is most common on Remote Desktop Services server farms. On a standalone server, add the user to the Remote Desktop Users group, or add the user's group to the Allow log on through Remote Desktop Services policy in secpol.msc. On a domain-joined server, the domain's Group Policy settings override the local policy.
Certificate and security
-
The identity of the remote computer cannot be verified
Certificate warning- Common cause
- The server presents a certificate your computer doesn't trust, or one issued for a different name.
- First check
- The certificate details shown in the warning window.
By default, Remote Desktop on the server uses a self-signed certificate that your computer doesn't recognize, so this warning is expected when you connect to a new server. Check that the certificate details belong to your server, and continue connecting. When the warning says Name mismatch, the name you connected to differs from the name in the certificate: connect using the name shown in the certificate, or set up a certificate on the server issued for the name you use.
-
Because of a security error, the client could not connect
Security error- Common cause
- Mismatched authentication and encryption settings, or corrupted licensing certificates on an RDS server.
- First check
- The security layer and encryption level settings of the connection on the server.
According to Microsoft, this message relates to the connection's authentication and encryption settings on the server, or to the licensing certificates of a server acting as an RD Session Host. Check the Security layer and Encryption level settings of the connection, and make sure a group policy does not enforce an encryption level your computer doesn't support. When the problem relates to licensing, Microsoft instructs you to back up and delete the X509 Certificate registry values and restart the server. Back up the registry before any change to it.
Disconnects and licensing
-
session ended because the remote computer didn't receive any input from you
Idle time- Common cause
- A policy that disconnects a session after no activity for the configured time.
- First check
- The settings in the Session Time Limits folder in gpedit.msc.
The connection was closed because there was no activity for the time set on the server. Depending on the server settings, the session keeps running after the disconnect, and you return to it when you connect again. On the server, open gpedit.msc, go to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Session Time Limits, and change or remove the time limit for idle sessions. The change applies after you reconnect.
-
The remote session ended because the total logon time limit was reached.
Maximum session time- Common cause
- A policy that limits the total time of an active session.
- First check
- The settings in the Session Time Limits folder in gpedit.msc.
This message appears when the session reaches the maximum time set for an active session, even if you worked in it the whole time. The limit is set in the same Session Time Limits folder in gpedit.msc. A computer policy overrides a user policy, and the change applies after you reconnect. According to Microsoft, disconnects that don't happen after a fixed period of time usually come from the network, not from the settings, so in that case check your internet connection and the network path to the server.
-
no Remote Desktop License Servers available to provide a license
RDS licensing- Common cause
- The Remote Desktop Session Host role is installed, and its grace period ended without a license server.
- First check
- Whether you need more than two simultaneous connections to the server.
The message starts with the words The remote session was disconnected. Windows Server allows two simultaneous administrative connections without additional licenses, while the Remote Desktop Session Host role, which allows more connections, requires a license server and RDS CALs once the grace period ends. When you don't need more than two connections, remove the role in Server Manager. When you do, install and activate a license server with licenses. Until then, you can connect with mstsc /admin, which doesn't require a connection license.
No matching errors.
Where to start
First, check whether the connection reaches the server. On your computer, run the following command in PowerShell, with the server name or address:
Test-NetConnection -ComputerName server.example.com -Port 3389When the TcpTestSucceeded field shows True, the port is open, and the problem is usually the sign-in details or the server settings. When it shows False, the server is off, Remote Desktop is not listening, or a firewall blocks the port. When you can't connect over RDP, run the checks on the server through the console your server provider offers in its management interface.
Commands to check the server
Run the commands in a PowerShell window with administrator privileges. The qwinsta command lists the sessions on the server, and the rdp-tcp line in the Listen state means Remote Desktop is ready to accept connections:
qwinstaThe following command shows the state of the Remote Desktop Services service. In PowerShell, type sc.exe with the extension, because sc on its own is an alias for another command:
sc.exe query TermServiceThe following command enables the Remote Desktop firewall rules, which allow connections to port 3389:
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"The following commands show the process ID (PID) listening on port 3389 and the process ID of the TermService service. When the IDs differ, another program is using the port:
netstat -ano | findstr 3389
tasklist /svc | findstr TermServiceThe following command shows the port configured for Remote Desktop:
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name 'PortNumber'The following commands add a user to the Remote Desktop Users group and list the members of the group:
Add-LocalGroupMember -Group "Remote Desktop Users" -Member "username"
Get-LocalGroupMember -Group "Remote Desktop Users"Simultaneous connections to the server
Windows Server allows two simultaneous Remote Desktop connections for administration, without RDS CALs. When both connections are in use, for example because of a session that was disconnected but not ended, list the sessions and end a session that is not in use by its number in the ID column:
query session
logoff 2Caution: logoff closes all programs in the session, and any unsaved data in them is lost. You can't close the console session with the logoff command. To connect to an administrative session on the server, run the following command on your computer, and when the port is not 3389, add it to the address, for example server.example.com:3390:
mstsc /admin /v:server.example.comOn a Windows VPS, you connect over RDP with full administrator access, so you can run every check on this page, from the firewall to active sessions, directly on the server.
RDP errors FAQ
What should I check when I can't connect to a server over RDP?
Start by testing the port from your computer with the PowerShell command Test-NetConnection, with the server address and the -Port 3389 option. When the port is closed, check on the server, through your server provider's console, that Remote Desktop is enabled, the Remote Desktop Services service is running, and the Remote Desktop firewall rules are enabled. When the port is open, the message you see points to the cause, and this page explains each common message and how to fix it.
How do I change the RDP port on a server?
The port number is stored in the PortNumber value of the RDP-Tcp registry key, and you can change it in PowerShell with the Set-ItemProperty command or in Registry Editor. Before the change, add firewall rules that allow the new port over TCP and UDP, and after the change, restart the server. On your next connection, type the address with the port, for example server.example.com:3390.
How many simultaneous RDP connections can a Windows server have?
Windows Server allows two simultaneous Remote Desktop connections for administering the server, without RDS CALs. For more connections, for example when several employees use the server at the same time, you need the Remote Desktop Session Host role and RDS CALs. Desktop editions of Windows, such as Windows 11, allow one active session at a time.
Why does a certificate warning appear when I connect to the server?
By default, Remote Desktop on the server uses a self-signed certificate, which your computer doesn't recognize, so the message The identity of the remote computer cannot be verified appears. When the certificate details belong to your server, you can continue connecting. When the warning says that the name in the certificate differs from the name you connected to, connect using the name shown in the certificate.
What is the difference between closing the RDP window and signing out of the server?
Closing the window disconnects you, but depending on the server settings, the session keeps running with all your open programs, and you return to it when you connect again. Signing out from the Start menu closes the programs and ends the session. On a server that allows a limited number of connections, signing out when you finish frees the connection for another user.