How to change the default remote desktop port for server login?
1. Open the regedit registry editor
2. Go to the branch OF_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp
3. Edit the PortNumber parameter in decimal format (by default, port RDP 3389)
4. You also need to allow connections on the new port in the Windows Firewall. In the run window, write firewall.cpl
5. Go to the "Advanced settings"
6. Right-click on the "Inbound rules" section to open the submenu, where we select "New rule"
7. Create a rule "For the port"
8. Specify the new TCP port (it is desirable to do the same for the UDP port)
9. We allow the connection and name the rule arbitrarily.
10. Restart the server.
In the future, when connecting to a remote desktop, you will need to specify the connection port with a colon after the IP