- Documentation
Elastic Compute Service
Elastic Compute Service
Troubleshooting
Remote log in issue
Windows operating system issue
Solution for port conflict during remote login to a Windows system instance
Windows operating system issue
Solution for port conflict during remote login to a Windows system instance
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
- Open the Task Manager of the Windows operating system.
- In the lower-left corner of the desktop, click the "Start" icon.
- Click the "Task Manager" card.
- Check the process occupying the remote port.
- In the upper-left corner of Task Manager, select "File > Run new task".
- In the "Create new task" dialog box, enter "cmd" and click "OK".
- In the command prompt window, run the following command to find the process occupying the remote port.
-
- Open the Registry Editor.
- In the upper-left corner of Task Manager, select "File > Run new task".
- In the "Create new task" dialog box, enter "regedit" and click "OK".
- Modify the remote service port number.
- 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.
- 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.
- After the configuration is complete, the Windows operating system will automatically recognize the new remote service port number.
- (Optional) Configure firewall inbound rules. If the firewall is not enabled, skip this step.
- In the lower-left corner of the desktop, enter "Firewall" and select "Firewall & network protection".
- Click "Advanced settings".
- Select "Inbound Rules > New Rule > Port (0)".
- Click "Next", select "Specific local ports", and enter the same new port used in the registry.
- Retain the default settings, and click "Next" repeatedly until the "Name" page is displayed.
- Enter a custom name for the inbound rule, and click the "Finish" button.
- Restart Remote Desktop Services.
- Open Task Manager by following Step 2.
- Click the "Services" tab.
- Right-click "Remote Desktop Services", and then click "Restart".
Last updated: 2026.04.13 16:50:03