远程桌面(RDP)服务是连接和管理Windows实例的基础。若未开启,则无法建立远程连接。本文介绍如何启动该服务。
操作步骤
本文以Windows Server 2012操作系统为例:
- 通过VNC远程登录Linux实例。具体请参见VNC远程登录。
-
打开【运行】窗口,输入【cmd】>单击【确定】,打开命令行工具。
-
执行以下命令,查看【3389端口】是否处于监听状态。
netstat -aon | findstr "3389" -
如果3389端口处于未监听状态,执行以下命令,进入PowerShell模式。
powershell - 执行以下命令,开启远程桌面连接RDP服务。
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server" -Name fDenyTSConnections -Value 0 -Force Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" -Name UserAuthentication -Value 1 -Force netsh.exe advfirewall firewall add rule name="Open RDP Port 3389" dir=in action=allow protocol=TCP localport=3389 - 远程连接Windows实例,确认登录Windows实例成功。