Furthermore, to maintain the access to your server after changing the Remote Desktop port, be sure that you also change the port in Windows Firewall's Remote Desktop Services rule OR create new rule with new RDP port by referring to this article. Otherwise, Windows firewall won't allow you to access your server using new Remote Desktop port.
- Login to your Windows server via Remote Desktop.
- Click on Start >> Run >> Type REGEDIT and hit enter. This will open registry editor.
- Locate and click following registry subkey.
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp
- Double click on the PortNumber registry subkey, select the Decimal base. Type new port number in Value data field and click OK to save the changes.
- Quit Registry Editor.
- Restart the VPS/server.