hot to change listening port remote desktop connection windows 7

I tried the technique to change the listening port using Regedit to change HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber.  I choose a port number in the unassigned range 54840  and it does not work.  If I don't change the port I can remote desktop to my windows 7 machine.  I am doing it on a subnet using  With the listening port unchanged everything OK.  With the port change I get "computer can not connect to remote computer".   Any ideas what else could be wrong? 

After you change the listening port on the RDC host/server computer and reboot the computer run the netstat -a command and check to see if the computer is listening on the new port, ie. 54840 in your case.

You might also look at using the PortQry or PortQryUI tools on your RDC host/server computer and a RDC LAN client to check if the port is actually listening on the RDC host/server computer.;en-us;310099

Download the PortQryUI tool...

Here is an example of using the PortQryUI tool on my Win 7 laptop to check on TCP Port 5938 on my wife's Win 7 desktop. In this case I use TeamViewer to remotely access/control her desktop over our home LAN for admin/maintenance purposes. TeamViewer uses TCP Port 5938 over the private LAN.

Here is an example of a query on a computer with the listening port not open.

If its not check whatever software firewall your running on the RDC host/server computer to make sure you have correctly configured it for the new port.

If you can't connect over the local LAN the issue is on the RDC host/server computer and you will never be able to connect from a remote site until the issue is fixed.

MS-MVP Windows Expert - Consumer
"When all else fails read the instructions"

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.


Question Info

Last updated October 7, 2019 Views 11,644 Applies to: