You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
Windows operating system issue
Solution for port conflict during remote login to a Windows system instance
Copy page
Download PDF
Solution for port conflict during remote login to a Windows system instance
This topic describes how to resolve the issue where remote login to a Windows instance fails due to a port conflict. The conflict occurs when the remote connection port (default port 3389) is occupied by another process or service.​
In the example provided in this topic, the built-in remote desktop connection tool (MSTSC) of the Windows operating system is used to remotely log in to a Windows instance.​
Procedure​
  1. Log in to the target instance. For more information, see Using a Windows host to log in to a Windows instance.​
  1. Open the Task Manager of the Windows operating system.​
  1. In the lower-left corner of the desktop, click the "Start" icon.​
  1. Click the "Task Manager" card.​
  1. Check the process occupying the remote port.​
  1. In the upper-left corner of Task Manager, select "File > Run new task".​
  1. In the "Create new task" dialog box, enter "cmd" and click "OK".​
  1. In the command prompt window, run the following command to find the process occupying the remote port.​
  • ​
    netstat -ano|findstr "3389"​
    ​
  • ​​​
  1. Open the Registry Editor.​
  1. In the upper-left corner of Task Manager, select "File > Run new task".​
  1. In the "Create new task" dialog box, enter "regedit" and click "OK".​
  1. Modify the remote service port number.​
  1. Navigate to the following registry path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp. Right-click "PortNumber", and then change the value of the "Value data" parameter from "3389" to another unused port.​
  1. Navigate to the following registry path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp. Right-click "PortNumber", and then change the value of the "Value data" parameter to the same port specified in the preceding TCP path.​
tip​
You must specify the same value for the "Value data" parameter of "PortNumber" in both the TCP and RDP-TCP paths.​
  1. After the configuration is complete, the Windows operating system will automatically recognize the new remote service port number.​
  1. (Optional) Configure firewall inbound rules. If the firewall is not enabled, skip this step.​
  1. In the lower-left corner of the desktop, enter "Firewall" and select "Firewall & network protection".​
  1. Click "Advanced settings".​
  1. Select "Inbound Rules > New Rule > Port (0)".​
  1. Click "Next", select "Specific local ports", and enter the same new port used in the registry.​
  1. Retain the default settings, and click "Next" repeatedly until the "Name" page is displayed.​
  1. Enter a custom name for the inbound rule, and click the "Finish" button.​
  1. Restart Remote Desktop Services.​
  1. Open Task Manager by following Step 2.​
  1. Click the "Services" tab.​
  1. Right-click "Remote Desktop Services", and then click "Restart".​
  1. Add the remote service port number to the security group configuration. For more information, see Configuring security group rules.​
  1. Log in to the instance again and check whether the issue is resolved. For more information, see Using a Windows host to log in to a Windows instance.​
Last updated: 2026.04.13 16:50:03