When user runs Remote Desktop Connection, a RDP (Remote Desktop Protocol, or more commonly known as Terminal Services) client in Windows XP, Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10 or later, and attempts to connect to Terminal Server service running on localhost (or using 127.0.0.1 IP address), which is own computer itself, Remote Desktop connection or session is disconnected, or rather unable and cannot connect with following error message.

The client could not connect. You are already connected to the console of this computer. A new console session cannot be established.

Your computer could not connect to another console session on the remote computer because you already have a console session in progress.

RDC Connects to Localhost

It’s Remote Desktop behavior in Windows operating sytem to explicitly prevent and refuse connection from localhost or 127.0.0.1. Connecting remote desktop client to localhost is useful for user who wants to have 2 sessions of desktop, to tunnel Remote Desktop connection through encrypted SSH (Secure Shell), or want to test if the patched termsrv.dll to unlock unlimited concurrent Remote Desktop sessions working or not.

There’s a few workarounds and hacks that enable user to use Remote Desktop to connect to local PC for another desktop session.

Workaround 1: Connect Remote Desktop Connection (RDC) to 127.0.0.2

The trick works in Windows XP Professional and Media Center Edition (MCE) prior to Windows XP Service Pack 2 (SP2), and may also works in Windows 7 or later OSes. 127.0.0.2 is the internal TCP/IP loopback address and Remote Desktop prior to version SP2 allow connection through the loopback 127.0.0.2 IP address, although it actively blocks connection via 127.0.0.1 or localhost string.

Workaround 2: Connect to RDC Terminal Services at Different Non Standard Port

Another workaround to the blockage of local host Remote Desktop connection in Windows is to connect to localhost (127.0.0.1) address on another port other than the default (3389). The hack is especially useful in Windows XP SP2 and SP3 where 127.0.0.2 forwarding IP address for localhost connection no longer work. By default, Remote Desktop listens and connects on port 3389. See the guide to change default Remote Desktop Terminal Services listening port, and how to connect using non-default port in Remote Desktop Connection.

Workaround 3: Run Remote Desktop Connection (mstsc.exe) Simulated as Another Operating System

Another hack to allow Remote Desktop Connection client to connect to localhost is to trick the Terminal Services into thinking that the RDC client is from another operating system, indirectly indicate it’s from another remote computer. To use the trick, follow these steps:

  1. Create a folder such as C:\RDC.
  2. Go to C:\Windows\System32\ folder and copy mstsc.exe and mstscax.dll files to the new folder.
  3. In the new folder, right click on mstsc.exe, and then select Properties.
  4. Go to Compatibility tab.
  5. Tick the check box for Run this program in compatibility mode for option.
  6. Select Windows 98 / Windows Me in the drop down list.
  7. Click on OK button.
  8. Double click on the mstsc.exe in the new folder to run Remote Desktop Connection or Terminal Services client, and now the client can connect to localhost or 127.0.0.1 as computer name.

Note that when logging in in Remote Desktop session, log on as different user or else you may be logging out forcefully.