When I use Remote Desktop Protocol (RDP) to connect to an Amazon Elastic Compute Cloud (Amazon EC2) Windows instance, I receive a "remote session was disconnected" error.
Resolution
When there is an issue with the Remote Desktop Services host settings on your Amazon EC2 Windows instance, you might receive the following error:
"The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license. Please contact the server administrator."
If you don't need to run more than two concurrent RDP sessions, then uninstall Remote Desktop Services.
Uninstall Remote Desktop Services
Complete the following steps:
-
Run the following command to open the Remote Desktop Services client and connect to the Windows server:
mstsc /admin
-
Run the following PowerShell command as an administrator:
Uninstall-WindowsFeature -name Remote-Desktop-Services -includemanagementtools -confirm
-
Reboot the machine.
Note: If you still can't use RDP to connect to a Windows instance, then you might have to perform additional troubleshooting. For more information, see How do I troubleshoot RDP connection issues with my Amazon EC2 Windows instance?
Troubleshooting CALs
If you installed the Remote Desktop Services host settings to allow more than two concurrent RDP client sessions, then you must purchase Client Access Licenses (CALs). RDS provides a licensing grace period of 120 days. After the grace period expires, you must purchase CALs to allow more than two concurrent RDP user sessions.
For help with CAL purchase or installation, contact your Value-Added Reseller (VAR) or Microsoft Partner.
If you purchased CALs and continue to get the same error, then the server might not be reachable by the instance that you connect to. For more information, see Cannot connect to RDS because no RD Licensing servers are available on the Microsoft website.
Related information
Connect to your Windows instance using RDP
mstsc on the Microsoft website
RDP displays a black screen instead of the desktop