适用範圍:Windows Server 2022、Windows 10、Windows 8.1、Windows 8、Windows Server 2019、Windows Server 2016、Windows Server 2012 R2、Windows Server 2008 R2
通過遠端桌面用戶端連接配接到計算機(Windows 用戶端或 Windows Server)時,計算機上的遠端桌面功能會通過定義的偵聽端口(預設情況下為 3389)“偵聽”連接配接請求。 可以通過修改系統資料庫來更改 Windows 計算機上的偵聽端口。
- 啟動系統資料庫編輯器。 (在“搜尋”框中鍵入 regedit。)
- 導航到以下系統資料庫子項:HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
- 右側找到PortNumber參數,預設端口為3389。
- 右鍵>“修改” ,然後單擊“十進制” 。
- 鍵入新端口号,然後單擊“确定” ,本例修改為14801。
-
關閉系統資料庫編輯器,然後重新啟動計算機。
下次使用遠端桌面連接配接連接配接到此計算機時,必須鍵入新端口。
如果正在使用防火牆,請確定将防火牆配置為允許連接配接到新端口号。